home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / U-Z / VideoToolBox.cpt / VideoToolboxSources / SetEntriesQuickly.c < prev    next >
MacBinary  |  1993-03-16  |  42.0 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Mar 16 01:11:38 1993, modified Tue Mar 16 01:11:38 1993, creator Think C, type ASCII, 41501 bytes "SetEntriesQuickly.c" , at 0xa29d 1218 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 53 65 74 45 6e 74 | 72 69 65 73 51 75 69 63 |..SetEnt|riesQuic|
|00000010| 6b 6c 79 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |kly.c...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 a2 1d 00 | 00 04 c2 a7 cb 20 1a a7 |........|..... ..|
|00000060| cb 20 1a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |. ......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 96 b5 00 00 |........|........|
|00000080| 2f 2a 0d 53 65 74 45 6e | 74 72 69 65 73 51 75 69 |/*.SetEn|triesQui|
|00000090| 63 6b 6c 79 2e 63 0d 0d | 4c 6f 61 64 20 74 68 65 |ckly.c..|Load the|
|000000a0| 20 63 6c 75 74 20 61 73 | 20 71 75 69 63 6b 6c 79 | clut as| quickly|
|000000b0| 20 61 73 20 70 6f 73 73 | 69 62 6c 65 2e 20 53 65 | as poss|ible. Se|
|000000c0| 74 45 6e 74 72 69 65 73 | 51 75 69 63 6b 6c 79 20 |tEntries|Quickly |
|000000d0| 68 61 73 20 6e 6f 74 20 | 62 65 65 6e 20 74 65 73 |has not |been tes|
|000000e0| 74 65 64 20 6f 6e 0d 61 | 6c 6c 20 74 68 65 20 64 |ted on.a|ll the d|
|000000f0| 65 76 69 63 65 73 20 74 | 68 61 74 20 69 74 27 73 |evices t|hat it's|
|00000100| 20 73 75 70 70 6f 73 65 | 64 20 74 6f 20 73 75 70 | suppose|d to sup|
|00000110| 70 6f 72 74 2e 20 52 75 | 6e 20 54 69 6d 65 56 69 |port. Ru|n TimeVi|
|00000120| 64 65 6f 20 66 6f 72 20 | 61 20 74 68 6f 72 6f 75 |deo for |a thorou|
|00000130| 67 68 0d 74 65 73 74 2e | 0d 0d 57 41 52 4e 49 4e |gh.test.|..WARNIN|
|00000140| 47 3a 20 54 68 69 73 20 | 66 69 6c 65 20 52 45 51 |G: This |file REQ|
|00000150| 55 49 52 45 53 20 36 38 | 30 32 30 20 6f 72 20 62 |UIRES 68|020 or b|
|00000160| 65 74 74 65 72 2c 20 61 | 6e 64 20 69 6e 63 6c 75 |etter, a|nd inclu|
|00000170| 64 65 73 20 61 20 23 70 | 72 61 67 6d 61 20 6f 70 |des a #p|ragma op|
|00000180| 74 69 6f 6e 0d 74 68 61 | 74 20 66 6f 72 63 65 73 |tion.tha|t forces|
|00000190| 20 74 68 65 20 63 6f 6d | 70 69 6c 65 72 20 74 6f | the com|piler to|
|000001a0| 20 61 73 73 75 6d 65 20 | 69 74 73 20 70 72 65 73 | assume |its pres|
|000001b0| 65 6e 63 65 2e 20 53 6f | 20 79 6f 75 20 73 68 6f |ence. So| you sho|
|000001c0| 75 6c 64 20 63 61 6c 6c | 20 47 65 73 74 61 6c 74 |uld call| Gestalt|
|000001d0| 20 0d 74 6f 20 6d 61 6b | 65 20 73 75 72 65 20 79 | .to mak|e sure y|
|000001e0| 6f 75 27 76 65 20 67 6f | 74 20 61 20 36 38 30 32 |ou've go|t a 6802|
|000001f0| 30 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |0 before| calling|
|00000200| 20 74 68 69 73 20 73 75 | 62 72 6f 75 74 69 6e 65 | this su|broutine|
|00000210| 2e 20 28 54 68 69 73 20 | 72 65 71 75 69 72 65 6d |. (This |requirem|
|00000220| 65 6e 74 0d 63 6f 75 6c | 64 20 62 65 20 65 6c 69 |ent.coul|d be eli|
|00000230| 6d 69 6e 61 74 65 64 20 | 62 79 20 72 65 77 72 69 |minated |by rewri|
|00000240| 74 69 6e 67 20 61 20 66 | 65 77 20 6e 6f 6e 65 73 |ting a f|ew nones|
|00000250| 73 65 6e 74 69 61 6c 20 | 61 73 73 65 6d 62 6c 79 |sential |assembly|
|00000260| 20 6c 61 6e 67 75 61 67 | 65 20 69 6e 73 74 72 75 | languag|e instru|
|00000270| 63 74 69 6f 6e 73 0d 74 | 6f 20 62 65 20 63 6f 6d |ctions.t|o be com|
|00000280| 70 61 74 69 62 6c 65 20 | 77 69 74 68 20 74 68 65 |patible |with the|
|00000290| 20 36 38 30 30 30 2c 20 | 62 75 74 20 49 20 28 64 | 68000, |but I (d|
|000002a0| 67 70 29 20 61 6d 20 6e | 6f 74 20 73 75 66 66 69 |gp) am n|ot suffi|
|000002b0| 63 69 65 6e 74 6c 79 20 | 66 6c 75 65 6e 74 0d 69 |ciently |fluent.i|
|000002c0| 6e 20 61 73 73 65 6d 62 | 6c 79 20 74 6f 20 62 65 |n assemb|ly to be|
|000002d0| 20 61 62 6c 65 20 74 6f | 20 64 6f 20 74 68 61 74 | able to| do that|
|000002e0| 20 71 75 69 63 6b 6c 79 | 2e 29 0d 0d 54 68 69 73 | quickly|.)..This|
|000002f0| 20 68 61 73 20 62 65 65 | 6e 20 77 72 69 74 74 65 | has bee|n writte|
|00000300| 6e 20 62 79 20 6d 61 6e | 79 20 70 65 6f 70 6c 65 |n by man|y people|
|00000310| 2c 20 61 6e 64 20 74 68 | 65 20 22 66 69 6e 61 6c |, and th|e "final|
|00000320| 22 20 72 65 73 75 6c 74 | 20 68 61 73 20 6e 6f 74 |" result| has not|
|00000330| 20 62 65 65 6e 20 74 65 | 73 74 65 64 0d 6f 6e 20 | been te|sted.on |
|00000340| 61 6c 6c 20 74 68 65 20 | 63 6f 6d 70 75 74 65 72 |all the |computer|
|00000350| 73 20 61 6e 64 20 76 69 | 64 65 6f 20 64 65 76 69 |s and vi|deo devi|
|00000360| 63 65 73 20 69 74 27 73 | 20 6d 65 61 6e 74 20 74 |ces it's| meant t|
|00000370| 6f 20 73 75 70 70 6f 72 | 74 2e 20 54 68 65 20 62 |o suppor|t. The b|
|00000380| 65 73 74 20 74 65 73 74 | 20 69 73 0d 73 69 6d 70 |est test| is.simp|
|00000390| 6c 79 20 74 6f 20 72 75 | 6e 20 54 69 6d 65 56 69 |ly to ru|n TimeVi|
|000003a0| 64 65 6f 2c 20 77 68 69 | 63 68 20 67 69 76 65 73 |deo, whi|ch gives|
|000003b0| 20 69 74 20 61 20 74 68 | 6f 72 6f 75 67 68 20 77 | it a th|orough w|
|000003c0| 6f 72 6b 6f 75 74 20 6f | 6e 20 61 6c 6c 20 6f 66 |orkout o|n all of|
|000003d0| 20 79 6f 75 72 0d 63 6f | 6d 70 75 74 65 72 27 73 | your.co|mputer's|
|000003e0| 20 76 69 64 65 6f 20 64 | 65 76 69 63 65 73 2e 20 | video d|evices. |
|000003f0| 50 6c 65 61 73 65 20 73 | 65 6e 64 20 74 68 65 20 |Please s|end the |
|00000400| 72 65 70 6f 72 74 20 22 | 54 69 6d 65 56 69 64 65 |report "|TimeVide|
|00000410| 6f 20 72 65 73 75 6c 74 | 73 22 20 74 6f 0d 64 65 |o result|s" to.de|
|00000420| 6e 69 73 5f 70 65 6c 6c | 69 40 69 73 72 2e 73 79 |nis_pell|i@isr.sy|
|00000430| 72 2e 65 64 75 2c 20 61 | 6e 64 20 49 27 6c 6c 20 |r.edu, a|nd I'll |
|00000440| 61 64 64 20 79 6f 75 72 | 20 74 65 73 74 20 72 65 |add your| test re|
|00000450| 73 75 6c 74 73 20 74 6f | 20 22 56 69 64 65 6f 20 |sults to| "Video |
|00000460| 73 79 6e 63 68 22 0d 28 | 73 65 63 74 69 6f 6e 20 |synch".(|section |
|00000470| 45 29 2e 20 4e 61 74 75 | 72 61 6c 6c 79 2c 20 77 |E). Natu|rally, w|
|00000480| 65 27 6c 6c 20 74 72 79 | 20 74 6f 20 66 69 78 20 |e'll try| to fix |
|00000490| 62 75 67 73 20 61 73 20 | 74 68 65 79 20 61 72 65 |bugs as |they are|
|000004a0| 20 64 69 73 63 6f 76 65 | 72 65 64 2e 0d 0d 53 6f | discove|red...So|
|000004b0| 6d 65 20 4d 61 63 69 6e | 74 6f 73 68 20 76 69 64 |me Macin|tosh vid|
|000004c0| 65 6f 20 64 72 69 76 65 | 72 73 20 61 72 65 20 70 |eo drive|rs are p|
|000004d0| 6f 6f 72 6c 79 20 77 72 | 69 74 74 65 6e 3b 20 74 |oorly wr|itten; t|
|000004e0| 68 65 79 20 74 61 6b 65 | 20 74 6f 6f 20 6c 6f 6e |hey take| too lon|
|000004f0| 67 20 28 6d 6f 72 65 20 | 74 68 61 6e 20 61 0d 66 |g (more |than a.f|
|00000500| 72 61 6d 65 20 74 69 6d | 65 29 20 74 6f 20 6c 6f |rame tim|e) to lo|
|00000510| 61 64 20 74 68 65 20 63 | 6c 75 74 2e 20 54 68 69 |ad the c|lut. Thi|
|00000520| 73 20 69 73 20 6d 61 6b | 65 73 20 69 74 20 69 6d |s is mak|es it im|
|00000530| 70 6f 73 73 69 62 6c 65 | 20 74 6f 20 64 6f 20 63 |possible| to do c|
|00000540| 6c 75 74 20 61 6e 69 6d | 61 74 69 6f 6e 0d 66 6f |lut anim|ation.fo|
|00000550| 72 20 74 65 6d 70 6f 72 | 61 6c 20 6d 6f 64 75 6c |r tempor|al modul|
|00000560| 61 74 69 6f 6e 20 65 74 | 63 2e 2c 20 66 6f 72 20 |ation et|c., for |
|00000570| 77 68 69 63 68 20 6f 6e | 65 20 6e 65 65 64 73 20 |which on|e needs |
|00000580| 74 6f 20 62 65 20 61 62 | 6c 65 20 74 6f 20 72 65 |to be ab|le to re|
|00000590| 6c 6f 61 64 20 74 68 65 | 20 63 6c 75 74 0d 6f 6e |load the| clut.on|
|000005a0| 20 65 61 63 68 20 66 72 | 61 6d 65 2e 20 41 74 20 | each fr|ame. At |
|000005b0| 6f 6e 65 20 74 69 6d 65 | 20 6d 61 6e 79 20 6f 66 |one time| many of|
|000005c0| 20 75 73 20 74 68 6f 75 | 67 68 74 20 74 68 61 74 | us thou|ght that|
|000005d0| 20 74 68 65 20 6c 69 6d | 69 74 61 74 69 6f 6e 20 | the lim|itation |
|000005e0| 77 61 73 20 69 6e 0d 68 | 61 72 64 77 61 72 65 2c |was in.h|ardware,|
|000005f0| 20 69 6e 20 74 68 65 20 | 52 41 4d 44 41 43 2c 20 | in the |RAMDAC, |
|00000600| 62 75 74 20 77 65 20 77 | 65 72 65 20 77 72 6f 6e |but we w|ere wron|
|00000610| 67 2e 20 52 61 79 6e 61 | 6c 64 20 43 6f 6d 70 74 |g. Rayna|ld Compt|
|00000620| 6f 69 73 20 64 69 73 61 | 73 73 65 6d 62 6c 65 64 |ois disa|ssembled|
|00000630| 0d 73 65 76 65 72 61 6c | 20 76 69 64 65 6f 20 64 |.several| video d|
|00000640| 72 69 76 65 72 73 20 61 | 6e 64 20 77 72 6f 74 65 |rivers a|nd wrote|
|00000650| 20 68 69 73 20 6f 77 6e | 20 70 72 6f 67 72 61 6d | his own| program|
|00000660| 73 20 74 6f 20 6c 6f 61 | 64 20 74 68 65 20 63 6c |s to loa|d the cl|
|00000670| 75 74 20 71 75 69 63 6b | 6c 79 2c 20 61 6e 64 0d |ut quick|ly, and.|
|00000680| 68 69 73 20 70 72 6f 67 | 72 61 6d 73 20 6d 61 6e |his prog|rams man|
|00000690| 61 67 65 20 74 6f 20 64 | 6f 20 69 74 20 77 69 74 |age to d|o it wit|
|000006a0| 68 69 6e 20 61 20 66 72 | 61 6d 65 2e 20 52 61 79 |hin a fr|ame. Ray|
|000006b0| 6e 61 6c 64 20 77 61 73 | 20 6b 69 6e 64 20 65 6e |nald was| kind en|
|000006c0| 6f 75 67 68 20 74 6f 20 | 73 68 61 72 65 0d 68 69 |ough to |share.hi|
|000006d0| 73 20 63 6f 64 65 20 77 | 69 74 68 20 6d 65 2e 20 |s code w|ith me. |
|000006e0| 49 20 70 61 73 73 65 64 | 20 69 74 20 6f 6e 20 74 |I passed| it on t|
|000006f0| 6f 20 50 65 74 65 72 20 | 4c 65 6e 6e 69 65 20 61 |o Peter |Lennie a|
|00000700| 6e 64 20 42 69 6c 6c 20 | 48 61 61 6b 65 2c 20 77 |nd Bill |Haake, w|
|00000710| 68 6f 20 70 6f 6c 69 73 | 68 65 64 0d 69 74 2c 20 |ho polis|hed.it, |
|00000720| 6d 61 6b 69 6e 67 20 69 | 74 20 63 6f 6d 70 61 74 |making i|t compat|
|00000730| 69 62 6c 65 20 77 69 74 | 68 20 74 68 65 20 36 38 |ible wit|h the 68|
|00000740| 30 34 30 20 70 72 6f 63 | 65 73 73 6f 72 2c 20 61 |040 proc|essor, a|
|00000750| 6e 64 20 61 64 64 65 64 | 20 73 75 70 70 6f 72 74 |nd added| support|
|00000760| 20 66 6f 72 20 6d 6f 72 | 65 0d 63 61 72 64 73 2e | for mor|e.cards.|
|00000770| 20 49 20 70 6f 6c 69 73 | 68 65 64 20 74 68 65 69 | I polis|hed thei|
|00000780| 72 20 77 6f 72 6b 2c 20 | 6d 61 64 65 20 74 68 65 |r work, |made the|
|00000790| 20 72 6f 75 74 69 6e 65 | 73 20 73 65 6c 66 20 63 | routine|s self c|
|000007a0| 6f 6e 74 61 69 6e 65 64 | 2c 20 61 64 64 69 6e 67 |ontained|, adding|
|000007b0| 20 61 0d 22 64 65 76 69 | 63 65 22 20 61 72 67 75 | a."devi|ce" argu|
|000007c0| 6d 65 6e 74 20 74 6f 20 | 61 6c 6c 6f 77 20 75 73 |ment to |allow us|
|000007d0| 65 20 69 6e 20 4d 61 63 | 73 20 74 68 61 74 20 68 |e in Mac|s that h|
|000007e0| 61 76 65 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |ave more| than on|
|000007f0| 65 20 76 69 64 65 6f 20 | 64 65 76 69 63 65 2c 20 |e video |device, |
|00000800| 61 6e 64 0d 71 75 69 63 | 6b 6c 79 20 66 69 67 75 |and.quic|kly figu|
|00000810| 72 69 6e 67 20 6f 75 74 | 20 61 6c 6c 20 74 68 65 |ring out| all the|
|00000820| 20 6b 65 79 20 70 61 72 | 61 6d 65 74 65 72 73 20 | key par|ameters |
|00000830| 28 6d 6f 64 65 2c 20 70 | 69 78 65 6c 53 69 7a 65 |(mode, p|ixelSize|
|00000840| 2c 20 44 41 43 20 73 69 | 7a 65 2c 20 61 6e 64 20 |, DAC si|ze, and |
|00000850| 63 6c 75 74 0d 73 69 7a | 65 29 2e 20 54 68 65 72 |clut.siz|e). Ther|
|00000860| 65 20 61 72 65 20 6e 6f | 77 20 74 77 6f 20 61 6c |e are no|w two al|
|00000870| 74 65 72 6e 61 74 69 76 | 65 20 66 72 6f 6e 74 20 |ternativ|e front |
|00000880| 65 6e 64 73 3a 20 53 65 | 74 45 6e 74 72 69 65 73 |ends: Se|tEntries|
|00000890| 51 75 69 63 6b 6c 79 28 | 29 20 66 6f 72 20 6e 65 |Quickly(|) for ne|
|000008a0| 77 0d 75 73 65 72 73 2c | 20 61 6e 64 20 6d 61 63 |w.users,| and mac|
|000008b0| 6c 74 73 65 74 28 29 20 | 66 6f 72 20 62 61 63 6b |ltset() |for back|
|000008c0| 77 61 72 64 20 63 6f 6d | 70 61 74 69 62 69 6c 69 |ward com|patibili|
|000008d0| 74 79 20 77 69 74 68 20 | 70 72 6f 67 72 61 6d 73 |ty with |programs|
|000008e0| 20 74 68 61 74 20 75 73 | 65 64 0d 52 61 79 6e 61 | that us|ed.Rayna|
|000008f0| 6c 64 27 73 20 6f 72 69 | 67 69 6e 61 6c 20 72 6f |ld's ori|ginal ro|
|00000900| 75 74 69 6e 65 73 2e 20 | 54 68 69 73 20 6d 6f 64 |utines. |This mod|
|00000910| 75 6c 61 72 69 74 79 20 | 68 61 73 20 69 6e 63 72 |ularity |has incr|
|00000920| 65 61 73 65 64 20 72 75 | 6e 74 69 6d 65 20 6f 6e |eased ru|ntime on|
|00000930| 6c 79 0d 73 6c 69 67 68 | 74 6c 79 2c 20 61 20 66 |ly.sligh|tly, a f|
|00000940| 72 61 63 74 69 6f 6e 20 | 6f 66 20 61 20 6d 69 6c |raction |of a mil|
|00000950| 6c 69 73 65 63 6f 6e 64 | 2e 0d 0d 4e 65 77 20 64 |lisecond|...New d|
|00000960| 72 69 76 65 72 73 20 61 | 72 65 20 68 61 72 64 20 |rivers a|re hard |
|00000970| 74 6f 20 77 72 69 74 65 | 2c 20 73 69 6e 63 65 20 |to write|, since |
|00000980| 74 68 65 79 20 6d 75 73 | 74 20 64 69 72 65 63 74 |they mus|t direct|
|00000990| 6c 79 20 61 64 64 72 65 | 73 73 20 74 68 65 20 72 |ly addre|ss the r|
|000009a0| 65 67 69 73 74 65 72 73 | 20 6f 66 0d 74 68 65 20 |egisters| of.the |
|000009b0| 76 69 64 65 6f 20 63 61 | 72 64 2c 20 77 68 69 63 |video ca|rd, whic|
|000009c0| 68 20 61 72 65 20 75 6e | 69 71 75 65 20 74 6f 20 |h are un|ique to |
|000009d0| 65 61 63 68 20 76 69 64 | 65 6f 20 63 61 72 64 20 |each vid|eo card |
|000009e0| 61 6e 64 20 75 6e 64 6f | 63 75 6d 65 6e 74 65 64 |and undo|cumented|
|000009f0| 2e 20 53 6f 20 74 68 65 | 0d 61 75 74 68 6f 72 20 |. So the|.author |
|00000a00| 6f 66 20 61 20 64 72 69 | 76 65 72 20 6d 75 73 74 |of a dri|ver must|
|00000a10| 20 64 69 73 61 73 73 65 | 6d 62 6c 65 20 74 68 65 | disasse|mble the|
|00000a20| 20 6f 72 69 67 69 6e 61 | 6c 20 76 69 64 65 6f 20 | origina|l video |
|00000a30| 64 72 69 76 65 72 20 61 | 6e 64 20 66 69 67 75 72 |driver a|nd figur|
|00000a40| 65 20 74 68 69 6e 67 73 | 0d 6f 75 74 20 6f 6e 20 |e things|.out on |
|00000a50| 68 69 73 20 6f 72 20 68 | 65 72 20 6f 77 6e 2e 20 |his or h|er own. |
|00000a60| 41 20 6c 6f 74 20 6f 66 | 20 77 6f 72 6b 2e 0d 0d |A lot of| work...|
|00000a70| 53 65 74 45 6e 74 72 69 | 65 73 51 75 69 63 6b 6c |SetEntri|esQuickl|
|00000a80| 79 20 69 73 20 75 6e 6c | 69 6b 65 20 74 68 65 20 |y is unl|ike the |
|00000a90| 73 74 61 6e 64 61 72 64 | 20 76 69 64 65 6f 20 64 |standard| video d|
|00000aa0| 72 69 76 65 72 73 20 69 | 6e 20 74 68 65 20 66 6f |rivers i|n the fo|
|00000ab0| 6c 6c 6f 77 69 6e 67 20 | 77 61 79 73 3a 0d 31 2e |llowing |ways:.1.|
|00000ac0| 20 53 65 74 45 6e 74 72 | 69 65 73 51 75 69 63 6b | SetEntr|iesQuick|
|00000ad0| 6c 79 20 61 6c 77 61 79 | 73 20 74 61 6b 65 73 20 |ly alway|s takes |
|00000ae0| 6c 65 73 73 20 74 68 61 | 6e 20 32 20 6d 73 20 74 |less tha|n 2 ms t|
|00000af0| 6f 20 6c 6f 61 64 20 74 | 68 65 20 77 68 6f 6c 65 |o load t|he whole|
|00000b00| 20 63 6c 75 74 2e 20 0d | 53 6f 6d 65 20 76 69 64 | clut. .|Some vid|
|00000b10| 65 6f 20 64 72 69 76 65 | 72 73 2c 20 65 2e 67 2e |eo drive|rs, e.g.|
|00000b20| 20 66 6f 72 20 41 70 70 | 6c 65 27 73 20 38 a5 32 | for App|le's 8.2|
|00000b30| 34 20 63 61 72 64 2c 20 | 6f 66 74 65 6e 20 74 61 |4 card, |often ta|
|00000b40| 6b 65 20 73 65 76 65 72 | 61 6c 20 66 72 61 6d 65 |ke sever|al frame|
|00000b50| 73 20 74 6f 20 0d 66 69 | 6e 69 73 68 20 6c 6f 61 |s to .fi|nish loa|
|00000b60| 64 69 6e 67 20 74 68 65 | 20 63 6c 75 74 2e 0d 32 |ding the| clut..2|
|00000b70| 41 2e 20 53 65 74 45 6e | 74 72 69 65 73 51 75 69 |A. SetEn|triesQui|
|00000b80| 63 6b 6c 79 20 64 6f 65 | 73 20 6e 6f 74 20 77 61 |ckly doe|s not wa|
|00000b90| 69 74 20 66 6f 72 20 56 | 42 4c 2c 20 73 6f 20 61 |it for V|BL, so a|
|00000ba0| 20 76 69 73 69 62 6c 65 | 20 67 6c 69 74 63 68 20 | visible| glitch |
|00000bb0| 6d 61 79 20 61 70 70 65 | 61 72 20 6f 6e 0d 74 68 |may appe|ar on.th|
|00000bc0| 65 20 63 75 72 72 65 6e | 74 20 66 72 61 6d 65 2c |e curren|t frame,|
|00000bd0| 20 61 74 20 6c 65 61 73 | 74 20 6f 6e 20 73 6f 6d | at leas|t on som|
|00000be0| 65 20 6f 6c 64 65 72 20 | 76 69 64 65 6f 20 63 61 |e older |video ca|
|00000bf0| 72 64 73 2e 20 28 59 6f | 75 20 63 61 6e 20 70 72 |rds. (Yo|u can pr|
|00000c00| 65 76 65 6e 74 20 74 68 | 69 73 0d 67 6c 69 74 63 |event th|is.glitc|
|00000c10| 68 20 62 79 20 63 61 6c | 6c 69 6e 67 20 53 65 74 |h by cal|ling Set|
|00000c20| 45 6e 74 72 69 65 73 51 | 75 69 63 6b 6c 79 20 6f |EntriesQ|uickly o|
|00000c30| 6e 6c 79 20 61 74 20 62 | 6c 61 6e 6b 69 6e 67 20 |nly at b|lanking |
|00000c40| 74 69 6d 65 2e 20 55 73 | 65 20 61 20 56 42 4c 20 |time. Us|e a VBL |
|00000c50| 74 61 73 6b 20 6f 72 0d | 57 61 69 74 46 6f 72 42 |task or.|WaitForB|
|00000c60| 6c 61 6e 6b 69 6e 67 28 | 29 2e 29 20 49 66 20 79 |lanking(|).) If y|
|00000c70| 6f 75 20 77 72 69 74 65 | 20 74 6f 20 74 68 65 20 |ou write| to the |
|00000c80| 74 61 62 6c 65 73 20 6f | 75 74 20 6f 66 20 73 79 |tables o|ut of sy|
|00000c90| 6e 63 68 20 77 69 74 68 | 20 74 68 65 20 56 42 4c |nch with| the VBL|
|00000ca0| 20 79 6f 75 20 67 65 74 | 0d 67 6c 69 74 63 68 65 | you get|.glitche|
|00000cb0| 73 20 6f 6e 20 6d 6f 73 | 74 20 63 61 72 64 73 2e |s on mos|t cards.|
|00000cc0| 20 20 53 6f 6d 65 20 6e | 65 77 20 63 61 72 64 73 | Some n|ew cards|
|00000cd0| 20 73 65 65 6d 20 74 6f | 20 68 61 76 65 20 64 75 | seem to| have du|
|00000ce0| 61 6c 20 70 6f 72 74 65 | 64 20 6d 65 6d 6f 72 79 |al porte|d memory|
|00000cf0| 2c 20 0d 61 73 20 64 6f | 65 73 20 74 68 65 20 51 |, .as do|es the Q|
|00000d00| 75 61 64 72 61 2c 20 73 | 6f 0d 79 6f 75 20 63 61 |uadra, s|o.you ca|
|00000d10| 6e 20 77 72 69 74 65 20 | 61 74 20 61 6e 79 20 70 |n write |at any p|
|00000d20| 6f 69 6e 74 20 69 6e 20 | 74 68 65 20 66 72 61 6d |oint in |the fram|
|00000d30| 65 20 63 79 63 6c 65 20 | 77 69 74 68 6f 75 74 20 |e cycle |without |
|00000d40| 6e 6f 74 69 63 65 61 62 | 6c 65 20 67 6c 69 74 63 |noticeab|le glitc|
|00000d50| 68 2c 20 74 68 6f 75 67 | 68 0d 6f 66 20 63 6f 75 |h, thoug|h.of cou|
|00000d60| 72 73 65 20 79 6f 75 20 | 6d 61 79 20 66 6f 72 20 |rse you |may for |
|00000d70| 6f 74 68 65 72 20 72 65 | 61 73 6f 6e 73 20 77 61 |other re|asons wa|
|00000d80| 6e 74 20 74 6f 20 73 79 | 6e 63 68 20 74 68 65 20 |nt to sy|nch the |
|00000d90| 75 70 64 61 74 65 2e 0d | 32 42 2e 20 41 20 66 6c |update..|2B. A fl|
|00000da0| 61 67 20 61 72 67 75 6d | 65 6e 74 20 22 77 61 69 |ag argum|ent "wai|
|00000db0| 74 46 6f 72 4e 65 78 74 | 42 6c 61 6e 6b 69 6e 67 |tForNext|Blanking|
|00000dc0| 22 20 69 73 20 70 72 6f | 76 69 64 65 64 2c 20 62 |" is pro|vided, b|
|00000dd0| 75 74 20 61 74 20 70 72 | 65 73 65 6e 74 20 74 68 |ut at pr|esent th|
|00000de0| 69 73 0d 6f 70 74 69 6f | 6e 20 69 73 20 6f 6e 6c |is.optio|n is onl|
|00000df0| 79 20 73 75 70 70 6f 72 | 74 65 64 20 66 6f 72 20 |y suppor|ted for |
|00000e00| 74 68 65 20 54 6f 62 79 | 20 76 69 64 65 6f 20 63 |the Toby| video c|
|00000e10| 61 72 64 2e 0d 33 2e 20 | 53 65 74 45 6e 74 72 69 |ard..3. |SetEntri|
|00000e20| 65 73 51 75 69 63 6b 6c | 79 20 69 67 6e 6f 72 65 |esQuickl|y ignore|
|00000e30| 73 20 74 68 65 20 67 61 | 6d 6d 61 20 74 61 62 6c |s the ga|mma tabl|
|00000e40| 65 2c 20 79 69 65 6c 64 | 69 6e 67 20 74 68 65 20 |e, yield|ing the |
|00000e50| 73 61 6d 65 20 72 65 73 | 75 6c 74 20 61 73 20 75 |same res|ult as u|
|00000e60| 73 69 6e 67 0d 74 68 65 | 20 73 74 61 6e 64 61 72 |sing.the| standar|
|00000e70| 64 20 76 69 64 65 6f 20 | 64 72 69 76 65 72 20 77 |d video |driver w|
|00000e80| 69 74 68 20 61 6e 20 75 | 6e 63 6f 72 72 65 63 74 |ith an u|ncorrect|
|00000e90| 65 64 20 67 61 6d 6d 61 | 20 74 61 62 6c 65 2e 20 |ed gamma| table. |
|00000ea0| 45 2e 67 2e 20 61 66 74 | 65 72 20 63 61 6c 6c 69 |E.g. aft|er calli|
|00000eb0| 6e 67 0d 47 44 55 6e 63 | 6f 72 72 65 63 74 65 64 |ng.GDUnc|orrected|
|00000ec0| 47 61 6d 6d 61 28 64 65 | 76 69 63 65 29 2e 0d 34 |Gamma(de|vice)..4|
|00000ed0| 2e 20 53 65 74 45 6e 74 | 72 69 65 73 51 75 69 63 |. SetEnt|riesQuic|
|00000ee0| 6b 6c 79 20 69 67 6e 6f | 72 65 73 20 74 68 65 20 |kly igno|res the |
|00000ef0| 73 65 74 74 69 6e 67 20 | 6f 66 20 74 68 65 20 67 |setting |of the g|
|00000f00| 72 61 79 2f 63 6f 6c 6f | 72 20 6d 6f 64 65 20 62 |ray/colo|r mode b|
|00000f10| 69 74 2c 20 61 6c 77 61 | 79 73 20 0d 61 73 73 75 |it, alwa|ys .assu|
|00000f20| 6d 69 6e 67 20 63 6f 6c | 6f 72 2e 0d 35 2e 20 53 |ming col|or..5. S|
|00000f30| 65 74 45 6e 74 72 69 65 | 73 51 75 69 63 6b 6c 79 |etEntrie|sQuickly|
|00000f40| 28 29 20 64 6f 65 73 20 | 6e 6f 74 68 69 6e 67 20 |() does |nothing |
|00000f50| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 61 6e 64 20 |and retu|rns and |
|00000f60| 65 72 72 6f 72 20 69 66 | 20 74 68 65 20 61 72 67 |error if| the arg|
|00000f70| 75 6d 65 6e 74 73 0d 73 | 70 65 63 69 66 79 20 6c |uments.s|pecify l|
|00000f80| 6f 61 64 69 6e 67 20 6f | 66 20 61 6e 20 6f 75 74 |oading o|f an out|
|00000f90| 2d 6f 66 2d 72 61 6e 67 | 65 20 69 6e 64 65 78 2e |-of-rang|e index.|
|00000fa0| 20 54 68 69 73 20 69 73 | 20 63 6f 6e 74 72 61 72 | This is| contrar|
|00000fb0| 79 20 74 6f 20 74 68 65 | 20 41 70 70 6c 65 0d 73 |y to the| Apple.s|
|00000fc0| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 20 66 6f 72 |pecifica|tion for|
|00000fd0| 20 74 68 65 20 53 65 74 | 45 6e 74 72 69 65 73 20 | the Set|Entries |
|00000fe0| 54 6f 6f 6c 62 6f 78 20 | 73 75 62 72 6f 75 74 69 |Toolbox |subrouti|
|00000ff0| 6e 65 20 74 68 61 74 20 | 77 68 65 6e 20 74 68 65 |ne that |when the|
|00001000| 20 63 6c 75 74 20 69 6e | 64 65 78 20 0d 69 73 20 | clut in|dex .is |
|00001010| 6f 75 74 20 6f 66 20 72 | 61 6e 67 65 20 74 68 65 |out of r|ange the|
|00001020| 20 64 72 69 76 65 72 20 | 69 6d 70 6c 65 6d 65 6e | driver |implemen|
|00001030| 74 69 6e 67 20 61 0d 73 | 65 74 45 6e 74 72 69 65 |ting a.s|etEntrie|
|00001040| 73 20 63 6f 6e 74 72 6f | 6c 20 63 61 6c 6c 20 73 |s contro|l call s|
|00001050| 68 6f 75 6c 64 20 77 72 | 61 70 20 61 72 6f 75 6e |hould wr|ap aroun|
|00001060| 64 20 77 69 74 68 69 6e | 20 74 68 65 20 6c 65 67 |d within| the leg|
|00001070| 61 6c 20 69 6e 64 65 78 | 20 72 61 6e 67 65 2e 0d |al index| range..|
|00001080| 36 2e 20 53 65 74 45 6e | 74 72 69 65 73 51 75 69 |6. SetEn|triesQui|
|00001090| 63 6b 6c 79 28 29 20 64 | 6f 65 73 20 6e 6f 74 68 |ckly() d|oes noth|
|000010a0| 69 6e 67 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ing and |returns |
|000010b0| 61 6e 20 65 72 72 6f 72 | 20 69 66 20 74 68 65 20 |an error| if the |
|000010c0| 22 63 6f 75 6e 74 22 0d | 73 70 65 63 69 66 69 65 |"count".|specifie|
|000010d0| 73 20 7a 65 72 6f 20 65 | 6e 74 72 69 65 73 2e 20 |s zero e|ntries. |
|000010e0| 54 68 69 73 20 69 73 20 | 63 6f 6e 74 72 61 72 79 |This is |contrary|
|000010f0| 20 74 6f 20 74 68 65 20 | 41 70 70 6c 65 20 73 70 | to the |Apple sp|
|00001100| 65 63 69 66 69 63 61 74 | 69 6f 6e 20 74 68 61 74 |ecificat|ion that|
|00001110| 20 61 0d 73 65 74 45 6e | 74 72 69 65 73 20 63 6f | a.setEn|tries co|
|00001120| 6e 74 72 6f 6c 20 63 61 | 6c 6c 20 77 69 74 68 20 |ntrol ca|ll with |
|00001130| 61 20 63 6f 75 6e 74 20 | 63 6f 72 72 65 73 70 6f |a count |correspo|
|00001140| 6e 64 69 6e 67 20 74 6f | 20 7a 65 72 6f 20 65 6e |nding to| zero en|
|00001150| 74 72 69 65 73 20 77 69 | 6c 6c 20 72 65 73 75 6c |tries wi|ll resul|
|00001160| 74 0d 69 6e 20 6c 6f 61 | 64 69 6e 67 20 6f 66 20 |t.in loa|ding of |
|00001170| 65 6e 74 72 69 65 73 20 | 73 70 65 63 69 66 69 65 |entries |specifie|
|00001180| 64 20 62 79 20 74 68 65 | 20 22 76 61 6c 75 65 22 |d by the| "value"|
|00001190| 20 66 69 65 6c 64 20 6f | 66 20 74 68 65 20 43 6f | field o|f the Co|
|000011a0| 6c 6f 72 53 70 65 63 2e | 0d 37 2e 20 53 65 74 45 |lorSpec.|.7. SetE|
|000011b0| 6e 74 72 69 65 73 51 75 | 69 63 6b 6c 79 20 64 6f |ntriesQu|ickly do|
|000011c0| 65 73 20 6e 6f 74 20 68 | 61 76 65 20 69 6d 6d 65 |es not h|ave imme|
|000011d0| 64 69 61 74 65 20 61 63 | 63 65 73 73 20 74 6f 20 |diate ac|cess to |
|000011e0| 74 68 65 20 76 69 64 65 | 6f 20 64 72 69 76 65 72 |the vide|o driver|
|000011f0| 27 73 0d 70 72 69 76 61 | 74 65 20 74 61 62 6c 65 |'s.priva|te table|
|00001200| 73 2e 20 54 68 65 72 65 | 66 6f 72 65 20 74 68 65 |s. There|fore the|
|00001210| 20 66 69 72 73 74 20 74 | 69 6d 65 20 79 6f 75 20 | first t|ime you |
|00001220| 63 61 6c 6c 20 53 65 74 | 45 6e 74 72 69 65 73 51 |call Set|EntriesQ|
|00001230| 75 69 63 6b 6c 79 28 29 | 20 66 6f 72 20 61 20 0d |uickly()| for a .|
|00001240| 70 61 72 74 69 63 75 6c | 61 72 20 64 65 76 69 63 |particul|ar devic|
|00001250| 65 20 74 68 65 72 65 20 | 69 73 20 61 6e 20 65 78 |e there |is an ex|
|00001260| 74 72 61 20 64 65 6c 61 | 79 20 6f 66 20 61 62 6f |tra dela|y of abo|
|00001270| 75 74 20 31 20 6d 73 20 | 77 68 69 6c 65 20 73 6f |ut 1 ms |while so|
|00001280| 6d 65 20 6b 65 79 0d 69 | 6e 66 6f 72 6d 61 74 69 |me key.i|nformati|
|00001290| 6f 6e 20 69 73 20 66 65 | 72 72 65 74 65 64 20 6f |on is fe|rreted o|
|000012a0| 75 74 2e 20 54 68 61 74 | 20 69 6e 66 6f 72 6d 61 |ut. That| informa|
|000012b0| 74 69 6f 6e 20 69 73 20 | 63 61 63 68 65 64 2c 20 |tion is |cached, |
|000012c0| 73 6f 20 73 75 62 73 65 | 71 75 65 6e 74 20 63 61 |so subse|quent ca|
|000012d0| 6c 6c 73 0d 66 6f 72 20 | 74 68 65 20 73 61 6d 65 |lls.for |the same|
|000012e0| 20 64 65 76 69 63 65 20 | 77 69 6c 6c 20 62 65 20 | device |will be |
|000012f0| 66 61 73 74 2c 20 73 70 | 65 6e 64 69 6e 67 20 6d |fast, sp|ending m|
|00001300| 6f 73 74 20 6f 66 20 74 | 68 65 69 72 20 74 69 6d |ost of t|heir tim|
|00001310| 65 20 6c 6f 61 64 69 6e | 67 20 74 68 65 20 63 6c |e loadin|g the cl|
|00001320| 75 74 2e 0d 0d 54 77 6f | 20 66 72 6f 6e 74 20 65 |ut...Two| front e|
|00001330| 6e 64 73 20 61 72 65 20 | 70 72 6f 76 69 64 65 64 |nds are |provided|
|00001340| 2c 20 66 6f 72 20 63 6f | 6d 70 61 74 69 62 69 6c |, for co|mpatibil|
|00001350| 69 74 79 20 77 69 74 68 | 20 74 77 6f 20 64 69 73 |ity with| two dis|
|00001360| 74 69 6e 63 74 20 74 72 | 61 64 69 74 69 6f 6e 73 |tinct tr|aditions|
|00001370| 3a 0d 0d 4f 53 45 72 72 | 20 53 65 74 45 6e 74 72 |:..OSErr| SetEntr|
|00001380| 69 65 73 51 75 69 63 6b | 6c 79 28 47 44 48 61 6e |iesQuick|ly(GDHan|
|00001390| 64 6c 65 20 64 65 76 69 | 63 65 2c 73 68 6f 72 74 |dle devi|ce,short|
|000013a0| 20 73 74 61 72 74 2c 73 | 68 6f 72 74 20 63 6f 75 | start,s|hort cou|
|000013b0| 6e 74 2c 43 6f 6c 6f 72 | 53 70 65 63 20 2a 74 61 |nt,Color|Spec *ta|
|000013c0| 62 6c 65 29 3b 0d 0d 53 | 65 74 45 6e 74 72 69 65 |ble);..S|etEntrie|
|000013d0| 73 51 75 69 63 6b 6c 79 | 28 29 20 75 73 65 73 20 |sQuickly|() uses |
|000013e0| 74 68 65 20 73 61 6d 65 | 20 63 61 6c 6c 69 6e 67 |the same| calling|
|000013f0| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 20 61 73 20 74 | convent|ion as t|
|00001400| 68 65 20 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 20 |he Video|Toolbox |
|00001410| 72 6f 75 74 69 6e 65 0d | 47 44 53 65 74 45 6e 74 |routine.|GDSetEnt|
|00001420| 72 69 65 73 28 29 20 61 | 6e 64 2c 20 65 78 63 65 |ries() a|nd, exce|
|00001430| 70 74 20 66 6f 72 20 61 | 64 64 69 6e 67 20 74 68 |pt for a|dding th|
|00001440| 65 20 47 44 48 61 6e 64 | 6c 65 20 61 72 67 75 6d |e GDHand|le argum|
|00001450| 65 6e 74 20 74 6f 20 73 | 70 65 63 69 66 79 20 74 |ent to s|pecify t|
|00001460| 68 65 0d 64 65 76 69 63 | 65 2c 20 69 73 20 61 6c |he.devic|e, is al|
|00001470| 73 6f 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 41 |so the s|ame as A|
|00001480| 70 70 6c 65 27 73 20 53 | 65 74 45 6e 74 72 69 65 |pple's S|etEntrie|
|00001490| 73 28 29 20 43 6f 6c 6f | 72 20 4d 61 6e 61 67 65 |s() Colo|r Manage|
|000014a0| 72 20 72 6f 75 74 69 6e | 65 2c 0d 64 6f 63 75 6d |r routin|e,.docum|
|000014b0| 65 6e 74 65 64 20 69 6e | 20 49 6e 73 69 64 65 20 |ented in| Inside |
|000014c0| 4d 61 63 69 6e 74 6f 73 | 68 20 56 2d 31 34 33 2e |Macintos|h V-143.|
|000014d0| 20 41 70 70 6c 65 20 73 | 70 65 63 69 66 69 65 73 | Apple s|pecifies|
|000014e0| 20 73 70 65 63 69 61 6c | 20 62 65 68 61 76 69 6f | special| behavio|
|000014f0| 72 20 77 68 65 6e 0d 63 | 6f 75 6e 74 3d 3d 2d 31 |r when.c|ount==-1|
|00001500| 2c 20 62 75 74 20 77 65 | 20 64 6f 6e 27 74 20 73 |, but we| don't s|
|00001510| 75 70 70 6f 72 74 20 74 | 68 61 74 20 68 65 72 65 |upport t|hat here|
|00001520| 20 61 6e 64 20 73 69 6d | 70 6c 79 20 72 65 74 75 | and sim|ply retu|
|00001530| 72 6e 20 77 69 74 68 20 | 61 6e 20 65 72 72 6f 72 |rn with |an error|
|00001540| 2e 20 49 0d 73 75 67 67 | 65 73 74 20 74 68 61 74 |. I.sugg|est that|
|00001550| 20 6e 65 77 20 75 73 65 | 72 73 20 75 73 65 20 53 | new use|rs use S|
|00001560| 65 74 45 6e 74 72 69 65 | 73 51 75 69 63 6b 6c 79 |etEntrie|sQuickly|
|00001570| 2e 20 22 73 74 61 72 74 | 22 20 69 73 20 74 68 65 |. "start|" is the|
|00001580| 20 69 6e 64 65 78 20 6f | 66 20 74 68 65 20 66 69 | index o|f the fi|
|00001590| 72 73 74 0d 63 6c 75 74 | 20 65 6e 74 72 79 20 74 |rst.clut| entry t|
|000015a0| 6f 20 6c 6f 61 64 2c 20 | 61 6e 64 20 73 68 6f 75 |o load, |and shou|
|000015b0| 6c 64 20 62 65 20 67 72 | 65 61 74 65 72 20 74 68 |ld be gr|eater th|
|000015c0| 61 6e 20 6f 72 20 65 71 | 75 61 6c 20 74 6f 20 7a |an or eq|ual to z|
|000015d0| 65 72 6f 2e 20 22 63 6f | 75 6e 74 22 20 69 73 20 |ero. "co|unt" is |
|000015e0| 74 68 65 0d 6e 75 6d 62 | 65 72 20 6f 66 20 65 6e |the.numb|er of en|
|000015f0| 74 72 69 65 73 20 74 6f | 20 6c 6f 61 64 2c 20 6d |tries to| load, m|
|00001600| 69 6e 75 73 20 31 2e 20 | 28 59 65 73 2c 20 22 6d |inus 1. |(Yes, "m|
|00001610| 69 6e 75 73 20 31 22 2c | 20 74 68 61 74 27 73 20 |inus 1",| that's |
|00001620| 41 70 70 6c 65 27 73 20 | 63 6f 6e 76 65 6e 74 69 |Apple's |conventi|
|00001630| 6f 6e 2e 29 0d 22 74 61 | 62 6c 65 22 20 69 73 20 |on.)."ta|ble" is |
|00001640| 61 20 43 6f 6c 6f 72 73 | 70 65 63 20 61 72 72 61 |a Colors|pec arra|
|00001650| 79 2e 20 28 45 61 63 68 | 20 43 6f 6c 6f 72 53 70 |y. (Each| ColorSp|
|00001660| 65 63 20 65 6c 65 6d 65 | 6e 74 20 69 73 20 61 20 |ec eleme|nt is a |
|00001670| 73 74 72 75 63 74 75 72 | 65 20 63 6f 6e 73 69 73 |structur|e consis|
|00001680| 74 69 6e 67 0d 6f 66 20 | 61 20 74 77 6f 2d 62 79 |ting.of |a two-by|
|00001690| 74 65 20 22 76 61 6c 75 | 65 22 2c 20 77 68 69 63 |te "valu|e", whic|
|000016a0| 68 20 69 73 20 6e 6f 74 | 20 75 73 65 64 2c 20 61 |h is not| used, a|
|000016b0| 6e 64 20 61 20 36 2d 62 | 79 74 65 20 22 72 67 62 |nd a 6-b|yte "rgb|
|000016c0| 22 2c 20 77 68 69 63 68 | 2c 20 69 6e 20 74 75 72 |", which|, in tur|
|000016d0| 6e 20 69 73 0d 61 20 73 | 74 72 75 63 74 75 72 65 |n is.a s|tructure|
|000016e0| 20 6f 66 20 74 68 72 65 | 65 20 31 36 2d 62 69 74 | of thre|e 16-bit|
|000016f0| 20 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 | unsigne|d short |
|00001700| 69 6e 74 73 3a 20 72 65 | 64 2c 20 67 72 65 65 6e |ints: re|d, green|
|00001710| 2c 20 61 6e 64 20 62 6c | 75 65 2e 20 41 70 70 6c |, and bl|ue. Appl|
|00001720| 65 27 73 0d 63 6f 6e 76 | 65 6e 74 69 6f 6e 20 69 |e's.conv|ention i|
|00001730| 73 20 74 68 61 74 20 74 | 68 65 20 4d 4f 53 54 20 |s that t|he MOST |
|00001740| 53 49 47 4e 49 46 49 43 | 41 4e 54 20 42 49 54 53 |SIGNIFIC|ANT BITS|
|00001750| 20 6f 66 20 74 68 65 20 | 31 36 2d 62 69 74 20 63 | of the |16-bit c|
|00001760| 6f 6c 6f 72 20 76 61 6c | 75 65 73 20 61 72 65 0d |olor val|ues are.|
|00001770| 75 73 65 64 2e 20 49 74 | 20 69 73 20 67 6f 6f 64 |used. It| is good|
|00001780| 20 70 72 61 63 74 69 63 | 65 20 69 6e 20 79 6f 75 | practic|e in you|
|00001790| 72 20 70 72 6f 67 72 61 | 6d 73 20 74 6f 20 70 72 |r progra|ms to pr|
|000017a0| 6f 76 69 64 65 20 66 75 | 6c 6c 20 31 36 2d 62 69 |ovide fu|ll 16-bi|
|000017b0| 74 20 76 61 6c 75 65 73 | 2c 20 73 6f 0d 74 68 61 |t values|, so.tha|
|000017c0| 74 20 77 68 65 6e 20 79 | 6f 75 20 75 70 67 72 61 |t when y|ou upgra|
|000017d0| 64 65 20 74 6f 20 66 61 | 6e 63 69 65 72 20 76 69 |de to fa|ncier vi|
|000017e0| 64 65 6f 20 63 61 72 64 | 73 20 77 69 74 68 20 6d |deo card|s with m|
|000017f0| 6f 72 65 2d 74 68 61 6e | 2d 65 69 67 68 74 20 62 |ore-than|-eight b|
|00001800| 69 74 20 44 41 43 73 20 | 79 6f 75 72 0d 70 72 6f |it DACs |your.pro|
|00001810| 67 72 61 6d 73 20 77 69 | 6c 6c 20 62 65 6e 65 66 |grams wi|ll benef|
|00001820| 69 74 20 66 72 6f 6d 20 | 74 68 65 20 65 78 74 72 |it from |the extr|
|00001830| 61 20 70 72 65 63 69 73 | 69 6f 6e 20 77 69 74 68 |a precis|ion with|
|00001840| 6f 75 74 20 6e 65 65 64 | 69 6e 67 20 61 6e 79 20 |out need|ing any |
|00001850| 63 68 61 6e 67 65 2e 0d | 52 65 74 75 72 6e 73 20 |change..|Returns |
|00001860| 7a 65 72 6f 20 69 66 20 | 73 75 63 63 65 73 73 66 |zero if |successf|
|00001870| 75 6c 2c 20 6e 6f 6e 7a | 65 72 6f 20 69 66 20 75 |ul, nonz|ero if u|
|00001880| 6e 73 75 63 63 65 73 73 | 66 75 6c 2c 20 69 2e 65 |nsuccess|ful, i.e|
|00001890| 2e 20 69 6c 6c 65 67 61 | 6c 20 61 72 67 75 6d 65 |. illega|l argume|
|000018a0| 6e 74 73 2e 0d 0d 73 68 | 6f 72 74 20 6d 61 63 6c |nts...sh|ort macl|
|000018b0| 74 73 65 74 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |tset(GDH|andle de|
|000018c0| 76 69 63 65 2c 73 68 6f | 72 74 20 73 74 61 72 74 |vice,sho|rt start|
|000018d0| 0d 09 2c 73 68 6f 72 74 | 2a 20 72 65 64 2c 73 68 |..,short|* red,sh|
|000018e0| 6f 72 74 2a 20 67 72 65 | 65 6e 2c 73 68 6f 72 74 |ort* gre|en,short|
|000018f0| 2a 20 62 6c 75 65 2c 73 | 68 6f 72 74 20 63 6f 75 |* blue,s|hort cou|
|00001900| 6e 74 31 29 3b 0d 0d 6d | 61 63 6c 74 73 65 74 28 |nt1);..m|acltset(|
|00001910| 29 20 75 73 65 73 20 61 | 20 63 61 6c 6c 69 6e 67 |) uses a| calling|
|00001920| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 20 65 73 74 61 | convent|ion esta|
|00001930| 62 6c 69 73 68 65 64 20 | 62 79 20 52 61 79 6e 61 |blished |by Rayna|
|00001940| 6c 64 20 43 6f 6d 74 6f | 69 73 2c 20 61 6e 64 0d |ld Comto|is, and.|
|00001950| 70 72 6f 76 69 64 65 73 | 20 62 61 63 6b 77 61 72 |provides| backwar|
|00001960| 64 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 20 |d compat|ibility |
|00001970| 77 69 74 68 20 6f 6c 64 | 65 72 20 70 72 6f 67 72 |with old|er progr|
|00001980| 61 6d 73 2e 20 22 72 65 | 64 22 2c 20 22 67 72 65 |ams. "re|d", "gre|
|00001990| 65 6e 22 2c 20 61 6e 64 | 20 22 62 6c 75 65 22 0d |en", and| "blue".|
|000019a0| 61 72 65 20 61 72 72 61 | 79 73 20 6f 66 20 31 36 |are arra|ys of 16|
|000019b0| 2d 62 69 74 20 75 6e 73 | 69 67 6e 65 64 20 73 68 |-bit uns|igned sh|
|000019c0| 6f 72 74 20 69 6e 74 73 | 2c 20 6f 66 20 77 68 69 |ort ints|, of whi|
|000019d0| 63 68 20 74 68 65 20 4c | 45 41 53 54 20 53 49 47 |ch the L|EAST SIG|
|000019e0| 4e 49 46 49 43 41 4e 54 | 20 42 49 54 53 0d 61 72 |NIFICANT| BITS.ar|
|000019f0| 65 20 75 73 65 64 2e 20 | 22 73 74 61 72 74 22 20 |e used. |"start" |
|00001a00| 69 73 20 74 68 65 20 69 | 6e 64 65 78 20 6f 66 20 |is the i|ndex of |
|00001a10| 74 68 65 20 66 69 72 73 | 74 20 65 6e 74 72 79 20 |the firs|t entry |
|00001a20| 74 6f 20 63 68 61 6e 67 | 65 2e 20 22 63 6f 75 6e |to chang|e. "coun|
|00001a30| 74 31 22 20 69 73 20 74 | 68 65 0d 6e 75 6d 62 65 |t1" is t|he.numbe|
|00001a40| 72 20 6f 66 20 65 6e 74 | 72 69 65 73 20 74 6f 20 |r of ent|ries to |
|00001a50| 63 68 61 6e 67 65 20 28 | 63 6f 6e 74 72 61 72 79 |change (|contrary|
|00001a60| 20 74 6f 20 41 70 70 6c | 65 27 73 20 63 6f 6e 76 | to Appl|e's conv|
|00001a70| 65 6e 74 69 6f 6e 29 2e | 0d 0d 42 6f 74 68 20 66 |ention).|..Both f|
|00001a80| 72 6f 6e 74 20 65 6e 64 | 73 20 75 73 65 20 74 68 |ront end|s use th|
|00001a90| 65 20 73 61 6d 65 20 67 | 65 6e 65 72 61 6c 2d 70 |e same g|eneral-p|
|00001aa0| 75 72 70 6f 73 65 20 73 | 75 62 72 6f 75 74 69 6e |urpose s|ubroutin|
|00001ab0| 65 3a 20 4c 6f 61 64 43 | 6c 75 74 28 29 2c 20 77 |e: LoadC|lut(), w|
|00001ac0| 68 69 63 68 20 69 6e 0d | 74 75 72 6e 20 63 61 6c |hich in.|turn cal|
|00001ad0| 6c 73 20 74 68 65 20 68 | 61 72 64 77 61 72 65 2d |ls the h|ardware-|
|00001ae0| 73 70 65 63 69 66 69 63 | 20 72 6f 75 74 69 6e 65 |specific| routine|
|00001af0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 74 6f 20 | appropr|iate to |
|00001b00| 74 68 65 20 70 61 72 74 | 69 63 75 6c 61 72 20 76 |the part|icular v|
|00001b10| 69 64 65 6f 20 0d 64 65 | 76 69 63 65 20 62 65 69 |ideo .de|vice bei|
|00001b20| 6e 67 20 75 73 65 64 2e | 0d 0d 54 68 65 20 75 73 |ng used.|..The us|
|00001b30| 65 4d 6f 73 74 53 69 67 | 6e 69 66 69 63 61 6e 74 |eMostSig|nificant|
|00001b40| 42 69 74 73 20 62 69 74 | 20 6f 66 20 74 68 65 20 |Bits bit| of the |
|00001b50| 22 66 6c 61 67 73 22 20 | 61 72 67 75 6d 65 6e 74 |"flags" |argument|
|00001b60| 20 73 70 65 63 69 66 69 | 65 73 20 77 68 65 74 68 | specifi|es wheth|
|00001b70| 65 72 20 74 6f 20 75 73 | 65 20 0d 41 70 70 6c 65 |er to us|e .Apple|
|00001b80| 27 73 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 20 28 66 |'s conve|ntion (f|
|00001b90| 6f 72 20 75 73 65 72 73 | 20 6f 66 20 53 65 74 45 |or users| of SetE|
|00001ba0| 6e 74 72 69 65 73 51 75 | 69 63 6b 6c 79 29 20 6f |ntriesQu|ickly) o|
|00001bb0| 72 20 52 61 79 6e 61 6c | 64 27 73 20 63 6f 6e 76 |r Raynal|d's conv|
|00001bc0| 65 6e 74 69 6f 6e 20 0d | 28 66 6f 72 20 75 73 65 |ention .|(for use|
|00001bd0| 72 73 20 6f 66 20 6d 61 | 63 6c 74 73 65 74 29 2e |rs of ma|cltset).|
|00001be0| 0d 0d 41 74 20 74 68 65 | 20 6d 6f 6d 65 6e 74 20 |..At the| moment |
|00001bf0| 61 6c 6c 20 74 68 65 20 | 73 75 70 70 6f 72 74 65 |all the |supporte|
|00001c00| 64 20 76 69 64 65 6f 20 | 63 61 72 64 73 20 68 61 |d video |cards ha|
|00001c10| 76 65 20 38 2d 62 69 74 | 20 44 41 43 73 2c 20 65 |ve 8-bit| DACs, e|
|00001c20| 78 63 65 70 74 20 74 68 | 65 20 52 61 73 74 65 72 |xcept th|e Raster|
|00001c30| 4f 70 73 0d 50 72 6f 43 | 6f 6c 6f 72 20 33 32 2c |Ops.ProC|olor 32,|
|00001c40| 20 77 68 69 63 68 20 68 | 61 73 20 39 2d 62 69 74 | which h|as 9-bit|
|00001c50| 20 44 41 43 73 2e 20 49 | 66 20 74 68 65 20 75 73 | DACs. I|f the us|
|00001c60| 65 4d 6f 73 74 53 69 67 | 6e 69 66 69 63 61 6e 74 |eMostSig|nificant|
|00001c70| 42 69 74 73 20 66 6c 61 | 67 20 69 73 20 74 72 75 |Bits fla|g is tru|
|00001c80| 65 0d 74 68 65 6e 20 79 | 6f 75 20 64 6f 6e 27 74 |e.then y|ou don't|
|00001c90| 20 6e 65 65 64 20 74 6f | 20 77 6f 72 72 79 2c 20 | need to| worry, |
|00001ca0| 61 73 20 74 68 65 20 6c | 65 61 73 74 20 73 69 67 |as the l|east sig|
|00001cb0| 6e 69 66 69 63 61 6e 74 | 20 62 69 74 20 6f 66 20 |nificant| bit of |
|00001cc0| 74 68 65 20 39 2d 62 69 | 74 20 44 41 43 0d 73 69 |the 9-bi|t DAC.si|
|00001cd0| 6d 70 6c 79 20 70 69 63 | 6b 73 20 75 70 20 74 68 |mply pic|ks up th|
|00001ce0| 65 20 6e 65 78 74 20 6c | 6f 77 65 72 20 62 69 74 |e next l|ower bit|
|00001cf0| 20 66 72 6f 6d 20 79 6f | 75 72 20 6e 75 6d 62 65 | from yo|ur numbe|
|00001d00| 72 73 2c 20 67 69 76 69 | 6e 67 20 79 6f 75 20 61 |rs, givi|ng you a|
|00001d10| 20 74 61 64 20 6d 6f 72 | 65 0d 70 72 65 63 69 73 | tad mor|e.precis|
|00001d20| 69 6f 6e 2e 20 48 6f 77 | 65 76 65 72 2c 20 69 66 |ion. How|ever, if|
|00001d30| 20 75 73 65 4d 6f 73 74 | 53 69 67 6e 69 66 69 63 | useMost|Signific|
|00001d40| 61 6e 74 42 69 74 73 20 | 66 6c 61 67 20 69 73 20 |antBits |flag is |
|00001d50| 66 61 6c 73 65 20 74 68 | 65 6e 2c 20 69 6e 20 6f |false th|en, in o|
|00001d60| 72 64 65 72 20 74 6f 0d | 75 73 65 20 74 68 65 20 |rder to.|use the |
|00001d70| 66 75 6c 6c 20 72 61 6e | 67 65 20 6f 66 20 74 68 |full ran|ge of th|
|00001d80| 65 20 44 41 43 20 79 6f | 75 20 6d 75 73 74 20 6d |e DAC yo|u must m|
|00001d90| 61 6b 65 20 61 6c 6c 20 | 79 6f 75 72 20 6e 75 6d |ake all |your num|
|00001da0| 62 65 72 73 20 74 77 69 | 63 65 20 61 73 20 62 69 |bers twi|ce as bi|
|00001db0| 67 2c 20 6f 72 20 2d 2d | 0d 63 6c 75 64 67 65 20 |g, or --|.cludge |
|00001dc0| 74 69 6d 65 21 20 2d 2d | 20 73 65 74 20 74 68 65 |time! --| set the|
|00001dd0| 20 75 73 65 4f 6e 6c 79 | 38 42 69 74 73 20 66 6c | useOnly|8Bits fl|
|00001de0| 61 67 2c 20 74 6f 20 72 | 65 71 75 65 73 74 20 74 |ag, to r|equest t|
|00001df0| 68 61 74 20 79 6f 75 72 | 20 38 2d 62 69 74 20 6e |hat your| 8-bit n|
|00001e00| 75 6d 62 65 72 73 20 62 | 65 0d 6d 75 6c 74 69 70 |umbers b|e.multip|
|00001e10| 6c 69 65 64 20 62 79 20 | 74 77 6f 2c 20 61 6c 6c |lied by |two, all|
|00001e20| 6f 77 69 6e 67 20 79 6f | 75 20 74 6f 20 75 73 65 |owing yo|u to use|
|00001e30| 20 74 68 65 20 77 68 6f | 6c 65 20 72 61 6e 67 65 | the who|le range|
|00001e40| 20 6f 66 20 74 68 65 20 | 44 41 43 20 77 69 74 68 | of the |DAC with|
|00001e50| 6f 75 74 0d 63 68 61 6e | 67 69 6e 67 20 74 68 65 |out.chan|ging the|
|00001e60| 20 72 65 73 74 20 6f 66 | 20 79 6f 75 72 20 70 72 | rest of| your pr|
|00001e70| 6f 67 72 61 6d 2c 20 62 | 75 74 20 77 61 73 74 69 |ogram, b|ut wasti|
|00001e80| 6e 67 20 74 68 65 20 44 | 41 43 27 73 20 6c 65 61 |ng the D|AC's lea|
|00001e90| 73 74 20 73 69 67 6e 69 | 66 69 63 61 6e 74 20 62 |st signi|ficant b|
|00001ea0| 69 74 0d 62 79 20 73 65 | 74 74 69 6e 67 20 69 74 |it.by se|tting it|
|00001eb0| 20 70 65 72 6d 61 6e 65 | 6e 74 6c 79 20 74 6f 20 | permane|ntly to |
|00001ec0| 7a 65 72 6f 2e 0d 0d 53 | 55 53 50 45 4e 44 49 4e |zero...S|USPENDIN|
|00001ed0| 47 20 49 4e 54 45 52 52 | 55 50 54 53 2e 20 49 66 |G INTERR|UPTS. If|
|00001ee0| 20 79 6f 75 20 77 69 73 | 68 2c 20 74 68 65 20 6c | you wis|h, the l|
|00001ef0| 6f 77 2d 6c 65 76 65 6c | 20 72 6f 75 74 69 6e 65 |ow-level| routine|
|00001f00| 73 20 77 69 6c 6c 20 73 | 75 73 70 65 6e 64 0d 69 |s will s|uspend.i|
|00001f10| 6e 74 65 72 72 75 70 74 | 73 20 77 68 69 6c 65 20 |nterrupt|s while |
|00001f20| 6c 6f 61 64 69 6e 67 20 | 74 68 65 20 63 6c 75 74 |loading |the clut|
|00001f30| 2e 20 50 72 65 73 75 6d | 61 62 6c 79 20 52 61 79 |. Presum|ably Ray|
|00001f40| 6e 61 6c 64 20 68 61 64 | 20 68 69 73 20 72 65 61 |nald had| his rea|
|00001f50| 73 6f 6e 73 20 66 6f 72 | 0d 69 6d 70 6c 65 6d 65 |sons for|.impleme|
|00001f60| 6e 74 69 6e 67 20 74 68 | 69 73 2c 20 73 6f 20 74 |nting th|is, so t|
|00001f70| 68 69 73 20 22 66 65 61 | 74 75 72 65 22 20 69 73 |his "fea|ture" is|
|00001f80| 20 65 6e 61 62 6c 65 64 | 20 77 68 65 6e 20 79 6f | enabled| when yo|
|00001f90| 75 20 75 73 65 20 6d 61 | 63 6c 74 73 65 74 28 29 |u use ma|cltset()|
|00001fa0| 2e 20 50 65 74 65 72 0d | 4c 65 6e 6e 69 65 20 77 |. Peter.|Lennie w|
|00001fb0| 72 69 74 65 73 2c 20 22 | 54 68 65 20 73 77 69 74 |rites, "|The swit|
|00001fc0| 63 68 20 74 6f 20 75 6e | 69 6e 74 65 72 72 75 70 |ch to un|interrup|
|00001fd0| 74 61 62 6c 65 20 70 72 | 6f 63 65 73 73 6f 72 20 |table pr|ocessor |
|00001fe0| 64 75 72 69 6e 67 20 74 | 68 65 20 77 72 69 74 65 |during t|he write|
|00001ff0| 20 69 73 2c 20 49 0d 74 | 68 69 6e 6b 2c 20 6f 75 | is, I.t|hink, ou|
|00002000| 74 20 6f 66 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |t of the| origina|
|00002010| 6c 20 64 72 69 76 65 72 | 73 20 28 74 68 6f 75 67 |l driver|s (thoug|
|00002020| 68 20 49 27 6d 20 6e 6f | 74 20 61 62 73 6f 6c 75 |h I'm no|t absolu|
|00002030| 74 65 6c 79 20 73 75 72 | 65 29 2e 20 20 49 20 69 |tely sur|e). I i|
|00002040| 6d 61 67 69 6e 65 0d 69 | 74 27 73 20 74 6f 20 61 |magine.i|t's to a|
|00002050| 76 6f 69 64 20 64 69 73 | 70 6c 61 79 20 67 6c 69 |void dis|play gli|
|00002060| 74 63 68 65 73 20 74 68 | 61 74 20 77 6f 75 6c 64 |tches th|at would|
|00002070| 20 72 65 73 75 6c 74 20 | 66 72 6f 6d 20 73 6f 6d | result |from som|
|00002080| 65 20 68 69 67 68 65 72 | 20 70 72 69 6f 72 69 74 |e higher| priorit|
|00002090| 79 0d 69 6e 74 65 72 72 | 75 70 74 20 73 75 73 70 |y.interr|upt susp|
|000020a0| 65 6e 64 69 6e 67 20 61 | 20 63 6c 75 74 20 72 65 |ending a| clut re|
|000020b0| 77 72 69 74 65 20 73 6f | 6d 65 77 68 65 72 65 20 |write so|mewhere |
|000020c0| 69 6e 20 74 68 65 20 6d | 69 64 64 6c 65 2e 22 20 |in the m|iddle." |
|000020d0| 48 6f 77 65 76 65 72 2c | 20 49 0d 64 6f 6e 27 74 |However,| I.don't|
|000020e0| 20 73 65 65 20 61 6e 79 | 20 61 64 76 61 6e 74 61 | see any| advanta|
|000020f0| 67 65 20 74 6f 20 73 75 | 73 70 65 6e 64 69 6e 67 |ge to su|spending|
|00002100| 20 69 6e 74 65 72 72 75 | 70 74 73 2c 20 61 6e 64 | interru|pts, and|
|00002110| 20 62 65 6c 69 65 76 65 | 20 74 68 61 74 20 74 68 | believe| that th|
|00002120| 65 72 65 20 69 73 20 61 | 0d 73 69 67 6e 69 66 69 |ere is a|.signifi|
|00002130| 63 61 6e 74 20 64 6f 77 | 6e 73 69 64 65 20 69 66 |cant dow|nside if|
|00002140| 20 79 6f 75 20 61 72 65 | 20 74 72 79 69 6e 67 20 | you are| trying |
|00002150| 74 6f 20 6b 65 65 70 20 | 74 72 61 63 6b 20 6f 66 |to keep |track of|
|00002160| 20 74 68 65 20 56 42 4c | 20 69 6e 74 65 72 72 75 | the VBL| interru|
|00002170| 70 74 73 20 6f 6e 0d 73 | 65 76 65 72 61 6c 20 76 |pts on.s|everal v|
|00002180| 69 64 65 6f 20 63 61 72 | 64 73 2c 20 73 69 6e 63 |ideo car|ds, sinc|
|00002190| 65 20 73 75 73 70 65 6e | 64 69 6e 67 20 69 6e 74 |e suspen|ding int|
|000021a0| 65 72 72 75 70 74 73 20 | 66 6f 72 20 31 20 6f 72 |errupts |for 1 or|
|000021b0| 20 32 20 6d 73 20 6d 69 | 67 68 74 20 62 65 20 6c | 2 ms mi|ght be l|
|000021c0| 6f 6e 67 0d 65 6e 6f 75 | 67 68 20 74 6f 20 6d 69 |ong.enou|gh to mi|
|000021d0| 73 73 20 61 20 77 68 6f | 6c 65 20 56 42 4c 20 69 |ss a who|le VBL i|
|000021e0| 6e 74 65 72 76 61 6c 2e | 20 54 68 75 73 20 53 65 |nterval.| Thus Se|
|000021f0| 74 45 6e 74 72 69 65 73 | 51 75 69 63 6b 6c 79 20 |tEntries|Quickly |
|00002200| 64 69 73 61 62 6c 65 73 | 20 74 68 69 73 0d 22 66 |disables| this."f|
|00002210| 65 61 74 75 72 65 22 2e | 20 48 6f 77 65 76 65 72 |eature".| However|
|00002220| 2c 20 74 68 69 73 20 69 | 73 20 6e 6f 74 20 61 20 |, this i|s not a |
|00002230| 70 68 69 6c 6f 73 6f 70 | 68 69 63 61 6c 20 64 65 |philosop|hical de|
|00002240| 62 61 74 65 2e 20 57 65 | 20 61 6c 6c 20 61 67 72 |bate. We| all agr|
|00002250| 65 65 20 74 68 61 74 0d | 69 6e 74 65 72 72 75 70 |ee that.|interrup|
|00002260| 74 73 20 73 68 6f 75 6c | 64 20 62 65 20 73 75 73 |ts shoul|d be sus|
|00002270| 70 65 6e 64 65 64 20 69 | 66 20 64 6f 69 6e 67 20 |pended i|f doing |
|00002280| 6f 74 68 65 72 77 69 73 | 65 20 77 6f 75 6c 64 20 |otherwis|e would |
|00002290| 6f 63 63 61 73 69 6f 6e | 61 6c 6c 79 20 72 65 73 |occasion|ally res|
|000022a0| 75 6c 74 20 69 6e 20 61 | 0d 76 69 73 69 62 6c 65 |ult in a|.visible|
|000022b0| 20 67 6c 69 74 63 68 2e | 20 44 6f 65 73 20 61 6e | glitch.| Does an|
|000022c0| 79 6f 6e 65 20 6b 6e 6f | 77 3f 0d 0d 4f 53 45 72 |yone kno|w?..OSEr|
|000022d0| 72 20 57 61 69 74 46 6f | 72 4e 65 78 74 42 6c 61 |r WaitFo|rNextBla|
|000022e0| 6e 6b 69 6e 67 28 47 44 | 48 61 6e 64 6c 65 20 64 |nking(GD|Handle d|
|000022f0| 65 76 69 63 65 29 3b 0d | 0d 57 61 69 74 73 20 66 |evice);.|.Waits f|
|00002300| 6f 72 20 62 65 67 69 6e | 6e 69 6e 67 20 6f 66 20 |or begin|ning of |
|00002310| 6e 65 78 74 20 62 6c 61 | 6e 6b 69 6e 67 20 69 6e |next bla|nking in|
|00002320| 74 65 72 76 61 6c 2e 20 | 43 75 72 72 65 6e 74 6c |terval. |Currentl|
|00002330| 79 20 74 68 69 73 20 73 | 75 70 70 6f 72 74 73 20 |y this s|upports |
|00002340| 6f 6e 6c 79 20 74 68 65 | 0d 54 6f 62 79 20 63 61 |only the|.Toby ca|
|00002350| 72 64 20 28 41 70 70 6c | 65 27 73 20 6f 72 69 67 |rd (Appl|e's orig|
|00002360| 69 6e 61 6c 20 76 69 64 | 65 6f 20 63 61 72 64 2c |inal vid|eo card,|
|00002370| 20 6e 6f 77 20 6f 62 73 | 6f 6c 65 74 65 29 2e 0d | now obs|olete)..|
|00002380| 0d 53 50 45 45 44 2e 20 | 53 65 74 45 6e 74 72 69 |.SPEED. |SetEntri|
|00002390| 65 73 51 75 69 63 6b 6c | 79 28 29 20 69 73 20 73 |esQuickl|y() is s|
|000023a0| 65 6c 66 20 63 6f 6e 74 | 61 69 6e 65 64 2e 20 59 |elf cont|ained. Y|
|000023b0| 6f 75 20 73 69 6d 70 6c | 79 20 67 69 76 65 20 69 |ou simpl|y give i|
|000023c0| 74 20 74 68 65 20 47 44 | 48 61 6e 64 6c 65 20 6f |t the GD|Handle o|
|000023d0| 66 0d 79 6f 75 72 20 76 | 69 64 65 6f 20 64 65 76 |f.your v|ideo dev|
|000023e0| 69 63 65 20 28 61 73 20 | 72 65 74 75 72 6e 65 64 |ice (as |returned|
|000023f0| 2c 20 65 2e 67 2e 20 62 | 79 20 47 65 74 53 63 72 |, e.g. b|y GetScr|
|00002400| 65 65 6e 44 65 76 69 63 | 65 29 2c 20 61 6e 64 20 |eenDevic|e), and |
|00002410| 74 65 6c 6c 20 69 74 20 | 77 68 61 74 20 79 6f 75 |tell it |what you|
|00002420| 0d 77 61 6e 74 20 74 6f | 20 64 6f 20 74 6f 20 74 |.want to| do to t|
|00002430| 68 65 20 63 6c 75 74 2e | 20 49 6e 20 6f 72 64 65 |he clut.| In orde|
|00002440| 72 20 74 6f 20 64 6f 20 | 74 68 69 73 20 66 6f 72 |r to do |this for|
|00002450| 20 79 6f 75 20 69 74 20 | 6e 65 65 64 73 20 74 6f | you it |needs to|
|00002460| 20 66 69 67 75 72 65 20 | 6f 75 74 20 61 0d 62 75 | figure |out a.bu|
|00002470| 6e 63 68 20 6f 66 20 73 | 74 75 66 66 20 61 62 6f |nch of s|tuff abo|
|00002480| 75 74 20 79 6f 75 72 20 | 76 69 64 65 6f 20 64 65 |ut your |video de|
|00002490| 76 69 63 65 2e 20 54 68 | 69 73 20 72 65 73 65 61 |vice. Th|is resea|
|000024a0| 72 63 68 20 74 61 6b 65 | 73 20 74 69 6d 65 3b 20 |rch take|s time; |
|000024b0| 74 68 65 20 66 69 72 73 | 74 20 74 69 6d 65 0d 79 |the firs|t time.y|
|000024c0| 6f 75 20 63 61 6c 6c 20 | 69 74 20 66 6f 72 20 61 |ou call |it for a|
|000024d0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 64 65 76 69 | particu|lar devi|
|000024e0| 63 65 20 69 74 20 74 61 | 6b 65 73 20 6f 6e 20 74 |ce it ta|kes on t|
|000024f0| 68 65 20 6f 72 64 65 72 | 20 6f 66 20 31 20 6d 73 |he order| of 1 ms|
|00002500| 20 74 6f 20 6c 6f 6f 6b | 20 75 70 0d 73 74 75 66 | to look| up.stuf|
|00002510| 66 2e 20 48 6f 77 65 76 | 65 72 2c 20 6d 75 63 68 |f. Howev|er, much|
|00002520| 20 6f 66 20 74 68 69 73 | 20 73 74 75 66 66 20 69 | of this| stuff i|
|00002530| 73 20 73 61 76 65 64 20 | 69 6e 20 61 20 63 61 63 |s saved |in a cac|
|00002540| 68 65 2c 20 66 6f 72 20 | 65 61 63 68 20 64 65 76 |he, for |each dev|
|00002550| 69 63 65 2c 20 61 6e 64 | 20 63 61 6e 0d 62 65 20 |ice, and| can.be |
|00002560| 72 65 74 72 69 65 76 65 | 64 20 71 75 69 63 6b 6c |retrieve|d quickl|
|00002570| 79 20 6e 65 78 74 20 74 | 69 6d 65 2e 20 53 6f 6d |y next t|ime. Som|
|00002580| 65 20 75 73 65 72 73 20 | 6d 69 67 68 74 20 62 65 |e users |might be|
|00002590| 20 63 6f 6e 63 65 72 6e | 65 64 20 74 68 61 74 20 | concern|ed that |
|000025a0| 61 6c 6c 20 74 68 69 73 | 0d 66 6f 6c 64 65 72 6f |all this|.foldero|
|000025b0| 6c 20 69 73 20 65 78 63 | 65 73 73 69 76 65 20 66 |l is exc|essive f|
|000025c0| 6f 72 20 61 20 66 61 73 | 74 20 6f 70 65 72 61 74 |or a fas|t operat|
|000025d0| 69 6f 6e 20 74 68 61 74 | 20 77 65 20 6d 61 79 20 |ion that| we may |
|000025e0| 77 61 6e 74 20 74 6f 20 | 64 6f 20 61 74 20 69 6e |want to |do at in|
|000025f0| 74 65 72 72 75 70 74 0d | 74 69 6d 65 2e 20 4d 79 |terrupt.|time. My|
|00002600| 20 61 6e 73 77 65 72 20 | 69 73 20 74 68 61 74 20 | answer |is that |
|00002610| 74 68 65 20 6f 76 65 72 | 68 65 61 64 20 69 73 20 |the over|head is |
|00002620| 6d 6f 64 65 73 74 20 63 | 6f 6d 70 61 72 65 64 20 |modest c|ompared |
|00002630| 74 6f 20 74 68 65 20 31 | 20 6f 72 20 32 20 6d 73 |to the 1| or 2 ms|
|00002640| 0d 72 65 71 75 69 72 65 | 64 20 74 6f 20 61 63 74 |.require|d to act|
|00002650| 75 61 6c 6c 79 20 6c 6f | 61 64 20 74 68 65 20 63 |ually lo|ad the c|
|00002660| 6c 75 74 2c 20 77 68 69 | 63 68 2c 20 69 6e 20 6d |lut, whi|ch, in m|
|00002670| 79 20 76 69 65 77 2c 20 | 69 73 20 74 6f 6f 20 6c |y view, |is too l|
|00002680| 6f 6e 67 20 61 20 74 69 | 6d 65 20 74 6f 0d 6b 65 |ong a ti|me to.ke|
|00002690| 65 70 20 69 6e 74 65 72 | 72 75 70 74 73 20 73 75 |ep inter|rupts su|
|000026a0| 73 70 65 6e 64 65 64 20 | 61 6e 79 77 61 79 2e 20 |spended |anyway. |
|000026b0| 4d 79 20 63 68 61 6e 67 | 65 73 20 74 6f 20 74 68 |My chang|es to th|
|000026c0| 65 20 61 73 73 65 6d 62 | 6c 79 20 6c 61 6e 67 75 |e assemb|ly langu|
|000026d0| 61 67 65 20 72 6f 75 74 | 69 6e 65 73 0d 74 6f 20 |age rout|ines.to |
|000026e0| 64 65 61 6c 20 77 69 74 | 68 20 76 61 72 69 61 62 |deal wit|h variab|
|000026f0| 6c 65 20 65 6c 65 6d 65 | 6e 74 53 70 61 63 69 6e |le eleme|ntSpacin|
|00002700| 67 20 61 6e 64 20 75 73 | 69 6e 67 20 6d 6f 73 74 |g and us|ing most|
|00002710| 2d 20 6f 72 20 6c 65 61 | 73 74 2d 73 69 67 6e 69 |- or lea|st-signi|
|00002720| 66 69 63 61 6e 74 20 62 | 69 74 73 0d 68 61 76 65 |ficant b|its.have|
|00002730| 20 61 64 64 65 64 20 65 | 78 74 72 61 20 6f 70 65 | added e|xtra ope|
|00002740| 72 61 74 69 6f 6e 73 2e | 20 48 6f 77 65 76 65 72 |rations.| However|
|00002750| 2c 20 69 74 20 69 73 20 | 69 6d 70 6f 72 74 61 6e |, it is |importan|
|00002760| 74 20 74 6f 20 72 65 61 | 6c 69 7a 65 20 74 68 61 |t to rea|lize tha|
|00002770| 74 20 74 68 65 20 74 69 | 6d 65 0d 70 65 6e 61 6c |t the ti|me.penal|
|00002780| 74 79 20 69 73 20 69 6e | 73 69 67 6e 69 66 69 63 |ty is in|signific|
|00002790| 61 6e 74 20 62 65 63 61 | 75 73 65 20 66 61 73 74 |ant beca|use fast|
|000027a0| 20 70 72 6f 63 65 73 73 | 6f 72 73 20 6c 69 6b 65 | process|ors like|
|000027b0| 20 74 68 65 20 36 38 30 | 32 30 2c 20 36 38 30 33 | the 680|20, 6803|
|000027c0| 30 2c 20 36 38 30 34 30 | 0d 61 72 65 20 70 72 69 |0, 68040|.are pri|
|000027d0| 6d 61 72 69 6c 79 20 6c | 69 6d 69 74 65 64 20 62 |marily l|imited b|
|000027e0| 79 20 74 68 65 20 74 69 | 6d 65 20 74 6f 20 61 63 |y the ti|me to ac|
|000027f0| 63 65 73 73 20 6d 65 6d | 6f 72 79 3b 20 62 79 20 |cess mem|ory; by |
|00002800| 6f 76 65 72 6c 61 70 70 | 69 6e 67 20 69 6e 73 74 |overlapp|ing inst|
|00002810| 72 75 63 74 69 6f 6e 0d | 65 78 65 63 75 74 69 6f |ruction.|executio|
|00002820| 6e 20 74 68 65 79 20 6d | 61 79 20 6c 6f 73 65 20 |n they m|ay lose |
|00002830| 61 6c 6d 6f 73 74 20 6e | 6f 20 74 69 6d 65 20 61 |almost n|o time a|
|00002840| 74 20 61 6c 6c 20 64 6f | 69 6e 67 20 72 65 67 69 |t all do|ing regi|
|00002850| 73 74 65 72 2d 74 6f 2d | 72 65 67 69 73 74 65 72 |ster-to-|register|
|00002860| 0d 61 72 69 74 68 6d 65 | 74 69 63 2e 20 54 68 65 |.arithme|tic. The|
|00002870| 20 6e 65 77 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 | new ope|rations |
|00002880| 64 6f 20 6e 6f 74 20 69 | 6e 76 6f 6c 76 65 20 61 |do not i|nvolve a|
|00002890| 6e 79 20 6e 65 77 20 6d | 65 6d 6f 72 79 20 61 63 |ny new m|emory ac|
|000028a0| 63 65 73 73 2e 0d 0d 54 | 68 65 20 63 6f 64 69 6e |cess...T|he codin|
|000028b0| 67 20 6f 66 20 74 68 65 | 20 4c 6f 61 64 43 6c 75 |g of the| LoadClu|
|000028c0| 74 20 22 64 72 69 76 65 | 72 22 20 72 6f 75 74 69 |t "drive|r" routi|
|000028d0| 6e 65 73 20 69 73 20 61 | 20 63 6f 6d 70 72 6f 6d |nes is a| comprom|
|000028e0| 69 73 65 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ise betw|een the |
|000028f0| 6e 65 65 64 73 0d 6f 66 | 20 53 65 74 45 6e 74 72 |needs.of| SetEntr|
|00002900| 69 65 73 51 75 69 63 6b | 6c 79 20 61 6e 64 20 6d |iesQuick|ly and m|
|00002910| 61 63 6c 74 73 65 74 2c | 20 77 68 69 63 68 20 62 |acltset,| which b|
|00002920| 6f 74 68 20 75 73 65 20 | 74 68 65 6d 2e 20 49 20 |oth use |them. I |
|00002930| 64 65 63 69 64 65 64 20 | 6e 6f 74 20 74 6f 20 77 |decided |not to w|
|00002940| 72 69 74 65 0d 73 65 70 | 61 72 61 74 65 20 63 6c |rite.sep|arate cl|
|00002950| 75 74 20 6c 6f 61 64 69 | 6e 67 20 6c 6f 6f 70 73 |ut loadi|ng loops|
|00002960| 20 66 6f 72 20 74 68 65 | 20 74 77 6f 20 63 61 73 | for the| two cas|
|00002970| 65 73 20 28 75 73 65 20 | 6d 6f 73 74 20 76 73 20 |es (use |most vs |
|00002980| 6c 65 61 73 74 20 73 69 | 67 6e 69 66 69 63 61 6e |least si|gnifican|
|00002990| 74 0d 62 69 74 73 29 2e | 20 49 20 62 65 6c 69 65 |t.bits).| I belie|
|000029a0| 76 65 20 28 62 75 74 20 | 68 61 76 65 20 6e 6f 74 |ve (but |have not|
|000029b0| 20 74 65 73 74 65 64 29 | 20 74 68 61 74 20 61 64 | tested)| that ad|
|000029c0| 64 69 6e 67 20 61 20 72 | 65 67 69 73 74 65 72 20 |ding a r|egister |
|000029d0| 6f 66 66 73 65 74 20 69 | 6e 73 74 65 61 64 20 6f |offset i|nstead o|
|000029e0| 66 0d 75 73 69 6e 67 20 | 61 6e 20 61 75 74 6f 69 |f.using |an autoi|
|000029f0| 6e 63 72 65 6d 65 6e 74 | 20 69 6e 73 74 72 75 63 |ncrement| instruc|
|00002a00| 74 69 6f 6e 20 69 6e 63 | 75 72 73 20 65 73 73 65 |tion inc|urs esse|
|00002a10| 6e 74 69 61 6c 6c 79 20 | 6e 6f 20 74 69 6d 65 20 |ntially |no time |
|00002a20| 70 65 6e 61 6c 74 79 20 | 62 65 63 61 75 73 65 0d |penalty |because.|
|00002a30| 74 68 65 20 70 72 6f 63 | 65 73 73 6f 72 20 61 75 |the proc|essor au|
|00002a40| 74 6f 6d 61 74 69 63 61 | 6c 6c 79 20 6f 76 65 72 |tomatica|lly over|
|00002a50| 6c 61 70 73 20 74 68 65 | 20 65 78 65 63 75 74 69 |laps the| executi|
|00002a60| 6f 6e 20 6f 66 20 73 75 | 63 68 20 69 6e 73 74 72 |on of su|ch instr|
|00002a70| 75 63 74 69 6f 6e 73 2e | 20 53 6f 20 49 0d 74 68 |uctions.| So I.th|
|00002a80| 69 6e 6b 20 74 68 61 74 | 20 53 65 74 45 6e 74 72 |ink that| SetEntr|
|00002a90| 69 65 73 51 75 69 63 6b | 6c 79 20 69 73 20 72 75 |iesQuick|ly is ru|
|00002aa0| 6e 6e 69 6e 67 20 66 6c | 61 74 20 6f 75 74 2c 20 |nning fl|at out, |
|00002ab0| 61 6e 64 20 64 6f 6e 27 | 74 20 73 65 65 20 61 6e |and don'|t see an|
|00002ac0| 79 20 70 72 6f 73 70 65 | 63 74 20 6f 66 0d 73 70 |y prospe|ct of.sp|
|00002ad0| 65 65 64 69 6e 67 20 69 | 74 20 75 70 20 73 69 67 |eeding i|t up sig|
|00002ae0| 6e 69 66 69 63 61 6e 74 | 6c 79 2e 20 4f 6e 20 74 |nificant|ly. On t|
|00002af0| 68 65 20 6f 74 68 65 72 | 20 68 61 6e 64 2c 20 49 |he other| hand, I|
|00002b00| 20 73 75 73 70 65 63 74 | 20 74 68 61 74 20 66 65 | suspect| that fe|
|00002b10| 74 63 68 69 6e 67 20 74 | 68 65 0d 6c 65 61 73 74 |tching t|he.least|
|00002b20| 20 73 69 67 6e 69 66 69 | 63 61 6e 74 20 62 79 74 | signifi|cant byt|
|00002b30| 65 20 62 79 20 64 6f 69 | 6e 67 20 61 20 62 79 74 |e by doi|ng a byt|
|00002b40| 65 20 61 63 63 65 73 73 | 20 74 6f 20 61 6e 20 6f |e access| to an o|
|00002b50| 64 64 20 61 64 64 72 65 | 73 73 20 28 66 6f 72 20 |dd addre|ss (for |
|00002b60| 6d 61 63 6c 74 73 65 74 | 29 0d 64 6f 65 73 20 73 |macltset|).does s|
|00002b70| 6c 6f 77 20 74 68 69 6e | 67 73 20 64 6f 77 6e 20 |low thin|gs down |
|00002b80| 70 65 72 68 61 70 73 20 | 33 30 25 20 28 74 68 6f |perhaps |30% (tho|
|00002b90| 75 67 68 20 49 20 68 61 | 76 65 6e 27 74 20 74 69 |ugh I ha|ven't ti|
|00002ba0| 6d 65 64 20 69 74 29 20 | 6f 76 65 72 20 64 6f 69 |med it) |over doi|
|00002bb0| 6e 67 20 61 20 77 6f 72 | 64 0d 61 63 63 65 73 73 |ng a wor|d.access|
|00002bc0| 20 74 6f 20 61 6e 20 65 | 76 65 6e 20 61 64 64 72 | to an e|ven addr|
|00002bd0| 65 73 73 2c 20 61 73 20 | 52 61 79 6e 61 6c 64 20 |ess, as |Raynald |
|00002be0| 68 61 64 20 6f 72 69 67 | 69 6e 61 6c 6c 79 20 63 |had orig|inally c|
|00002bf0| 6f 64 65 64 20 69 74 2e | 20 49 66 20 74 68 61 74 |oded it.| If that|
|00002c00| 20 73 70 65 65 64 0d 6c | 6f 73 73 20 69 73 20 75 | speed.l|oss is u|
|00002c10| 6e 61 63 63 65 70 74 61 | 62 6c 65 2c 20 74 68 65 |naccepta|ble, the|
|00002c20| 6e 20 6f 6e 65 20 63 6f | 75 6c 64 20 69 6e 73 65 |n one co|uld inse|
|00002c30| 72 74 20 61 6e 20 69 66 | 28 66 6c 61 67 73 26 75 |rt an if|(flags&u|
|00002c40| 73 65 4d 6f 73 74 53 69 | 67 6e 69 66 69 63 61 6e |seMostSi|gnifican|
|00002c50| 74 42 69 74 73 29 0d 73 | 74 61 74 65 6d 65 6e 74 |tBits).s|tatement|
|00002c60| 20 69 6e 74 6f 20 74 68 | 65 20 72 65 6c 65 76 61 | into th|e releva|
|00002c70| 6e 74 20 73 75 62 72 6f | 75 74 69 6e 65 20 61 6e |nt subro|utine an|
|00002c80| 64 20 77 72 69 74 65 20 | 74 77 6f 20 73 65 70 61 |d write |two sepa|
|00002c90| 72 61 74 65 20 6c 6f 6f | 70 73 20 6f 70 74 69 6d |rate loo|ps optim|
|00002ca0| 69 7a 65 64 0d 66 6f 72 | 20 74 68 65 20 74 77 6f |ized.for| the two|
|00002cb0| 20 63 61 73 65 73 2e 20 | 4d 79 20 67 75 65 73 73 | cases. |My guess|
|00002cc0| 20 69 73 20 74 68 61 74 | 20 74 68 65 20 63 75 72 | is that| the cur|
|00002cd0| 72 65 6e 74 20 63 6f 6d | 70 72 6f 6d 69 73 65 20 |rent com|promise |
|00002ce0| 77 69 6c 6c 20 62 65 20 | 61 63 63 65 70 74 61 62 |will be |acceptab|
|00002cf0| 6c 65 20 74 6f 0d 61 6c | 6c 20 75 73 65 72 73 2e |le to.al|l users.|
|00002d00| 0d 0d 4e 4f 54 45 3a 20 | 54 68 65 20 66 69 72 73 |..NOTE: |The firs|
|00002d10| 74 20 63 61 6c 6c 20 6f | 66 20 53 65 74 45 6e 74 |t call o|f SetEnt|
|00002d20| 72 69 65 73 51 75 69 63 | 6b 6c 79 20 66 6f 72 20 |riesQuic|kly for |
|00002d30| 65 61 63 68 20 64 65 76 | 69 63 65 20 69 73 20 73 |each dev|ice is s|
|00002d40| 6c 6f 77 2c 20 62 75 74 | 20 73 6f 6d 65 0d 73 74 |low, but| some.st|
|00002d50| 75 66 66 20 69 73 20 63 | 61 63 68 65 64 20 73 6f |uff is c|ached so|
|00002d60| 20 73 75 62 73 65 71 75 | 65 6e 74 20 63 61 6c 6c | subsequ|ent call|
|00002d70| 73 20 77 69 6c 6c 20 62 | 65 20 71 75 69 63 6b 2e |s will b|e quick.|
|00002d80| 20 54 68 65 20 69 6d 70 | 6c 69 63 61 74 69 6f 6e | The imp|lication|
|00002d90| 20 69 73 20 74 68 61 74 | 0d 70 72 6f 67 72 61 6d | is that|.program|
|00002da0| 73 20 74 68 61 74 20 75 | 73 65 20 53 65 74 45 6e |s that u|se SetEn|
|00002db0| 74 72 69 65 73 51 75 69 | 63 6b 6c 79 20 6f 75 67 |triesQui|ckly oug|
|00002dc0| 68 74 20 74 6f 20 63 61 | 6c 6c 20 69 74 20 6f 6e |ht to ca|ll it on|
|00002dd0| 63 65 20 6a 75 73 74 20 | 66 6f 72 20 70 72 61 63 |ce just |for prac|
|00002de0| 74 69 63 65 20 28 74 6f | 0d 67 65 74 20 74 68 65 |tice (to|.get the|
|00002df0| 20 63 61 63 68 65 20 6c | 6f 61 64 69 6e 67 20 6f | cache l|oading o|
|00002e00| 76 65 72 20 77 69 74 68 | 29 20 62 65 66 6f 72 65 |ver with|) before|
|00002e10| 20 75 73 69 6e 67 20 69 | 74 20 69 6e 20 61 20 73 | using i|t in a s|
|00002e20| 69 74 75 61 74 69 6f 6e | 20 77 68 65 72 65 20 73 |ituation| where s|
|00002e30| 70 65 65 64 0d 6d 61 74 | 74 65 72 73 2e 0d 0d 52 |peed.mat|ters...R|
|00002e40| 45 51 55 49 52 45 53 20 | 36 38 30 32 30 20 6f 72 |EQUIRES |68020 or|
|00002e50| 20 62 65 74 74 65 72 2e | 0d 0d 49 4d 50 52 4f 56 | better.|..IMPROV|
|00002e60| 45 4d 45 4e 54 53 3a 0d | 49 74 20 69 73 20 68 6f |EMENTS:.|It is ho|
|00002e70| 70 65 64 20 74 68 61 74 | 20 6f 74 68 65 72 73 20 |ped that| others |
|00002e80| 77 69 6c 6c 20 61 64 64 | 20 74 6f 20 74 68 65 20 |will add| to the |
|00002e90| 66 75 6e 63 74 69 6f 6e | 61 6c 69 74 79 20 6f 66 |function|ality of|
|00002ea0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 20 50 | this ro|utine. P|
|00002eb0| 6c 65 61 73 65 0d 73 68 | 61 72 65 20 79 6f 75 72 |lease.sh|are your|
|00002ec0| 20 65 6e 68 61 6e 63 65 | 6d 65 6e 74 73 20 77 69 | enhance|ments wi|
|00002ed0| 74 68 20 6f 74 68 65 72 | 73 20 62 79 20 73 65 6e |th other|s by sen|
|00002ee0| 64 69 6e 67 20 74 68 65 | 6d 20 74 6f 20 64 65 6e |ding the|m to den|
|00002ef0| 69 73 5f 70 65 6c 6c 69 | 40 69 73 72 2e 73 79 72 |is_pelli|@isr.syr|
|00002f00| 2e 65 64 75 0d 66 6f 72 | 20 69 6e 63 6c 75 73 69 |.edu.for| inclusi|
|00002f10| 6f 6e 20 69 6e 20 74 68 | 65 20 56 69 64 65 6f 54 |on in th|e VideoT|
|00002f20| 6f 6f 6c 62 6f 78 2e 0d | 0d 54 68 6f 73 65 20 77 |oolbox..|.Those w|
|00002f30| 69 73 68 69 6e 67 20 74 | 6f 20 73 75 70 70 6f 72 |ishing t|o suppor|
|00002f40| 74 20 6e 65 77 20 76 69 | 64 65 6f 20 64 65 76 69 |t new vi|deo devi|
|00002f50| 63 65 73 20 73 68 6f 75 | 6c 64 20 62 65 67 69 6e |ces shou|ld begin|
|00002f60| 20 62 79 20 62 75 79 69 | 6e 67 20 61 6e 64 20 72 | by buyi|ng and r|
|00002f70| 65 61 64 69 6e 67 0d 41 | 70 70 6c 65 27 73 20 44 |eading.A|pple's D|
|00002f80| 65 73 69 67 6e 69 6e 67 | 20 43 61 72 64 73 20 61 |esigning| Cards a|
|00002f90| 6e 64 20 44 72 69 76 65 | 72 73 2c 20 33 72 64 20 |nd Drive|rs, 3rd |
|00002fa0| 45 64 2e 2c 20 41 64 64 | 69 73 6f 6e 2d 57 65 73 |Ed., Add|ison-Wes|
|00002fb0| 6c 65 79 2c 20 61 6e 64 | 20 74 68 65 6e 20 75 73 |ley, and| then us|
|00002fc0| 65 20 74 68 65 0d 56 69 | 64 65 6f 54 6f 6f 6c 62 |e the.Vi|deoToolb|
|00002fd0| 6f 78 20 75 74 69 6c 69 | 74 79 20 47 65 74 56 69 |ox utili|ty GetVi|
|00002fe0| 64 65 6f 44 72 69 76 65 | 72 73 20 74 6f 20 63 6f |deoDrive|rs to co|
|00002ff0| 70 79 20 61 6c 6c 20 79 | 6f 75 72 20 64 72 69 76 |py all y|our driv|
|00003000| 65 72 73 20 69 6e 74 6f | 20 72 65 73 6f 75 72 63 |ers into| resourc|
|00003010| 65 0d 66 69 6c 65 73 2c | 20 61 6e 64 20 75 73 65 |e.files,| and use|
|00003020| 20 52 65 73 45 64 69 74 | 20 77 69 74 68 20 43 4f | ResEdit| with CO|
|00003030| 44 45 20 65 64 69 74 6f | 72 20 74 6f 20 70 65 72 |DE edito|r to per|
|00003040| 75 73 65 20 74 68 65 6d | 2e 20 54 68 65 20 52 65 |use them|. The Re|
|00003050| 73 45 64 69 74 20 43 4f | 44 45 20 65 64 69 74 6f |sEdit CO|DE edito|
|00003060| 72 0d 69 73 20 61 20 70 | 75 62 6c 69 63 20 64 6f |r.is a p|ublic do|
|00003070| 6d 61 69 6e 20 66 69 6c | 65 20 64 69 73 74 72 69 |main fil|e distri|
|00003080| 62 75 74 65 64 20 62 79 | 3a 0d 49 72 61 20 4c 2e |buted by|:.Ira L.|
|00003090| 20 52 75 62 65 6e 0d 41 | 70 70 6c 65 20 43 6f 6d | Ruben.A|pple Com|
|000030a0| 70 75 74 65 72 2c 20 49 | 6e 63 2e 0d 32 30 35 32 |puter, I|nc..2052|
|000030b0| 35 20 4d 61 72 69 61 6e | 69 20 41 76 65 2e 2c 20 |5 Marian|i Ave., |
|000030c0| 4d 53 3a 20 33 37 2d 41 | 0d 43 75 70 65 72 74 69 |MS: 37-A|.Cuperti|
|000030d0| 6e 6f 2c 20 43 61 2e 20 | 39 35 30 31 34 0d 49 72 |no, Ca. |95014.Ir|
|000030e0| 61 40 41 70 70 6c 65 2e | 43 6f 6d 0d 66 74 70 2e |a@Apple.|Com.ftp.|
|000030f0| 61 70 70 6c 65 2e 63 6f | 6d 3a 2f 64 74 73 2f 6d |apple.co|m:/dts/m|
|00003100| 61 63 2f 74 6f 6f 6c 73 | 2f 72 65 73 65 64 69 74 |ac/tools|/resedit|
|00003110| 2f 72 65 73 65 64 69 74 | 2d 32 2d 31 2d 63 6f 64 |/resedit|-2-1-cod|
|00003120| 65 2d 65 64 69 74 6f 72 | 2e 2e 2e 0d 0d 49 74 20 |e-editor|.....It |
|00003130| 69 73 20 6c 6f 67 69 63 | 61 6c 20 74 68 61 74 20 |is logic|al that |
|00003140| 77 65 20 69 64 65 6e 74 | 69 66 79 20 74 68 65 20 |we ident|ify the |
|00003150| 76 69 64 65 6f 20 63 61 | 72 64 20 62 79 20 74 68 |video ca|rd by th|
|00003160| 65 20 63 61 72 64 20 6e | 61 6d 65 2c 0d 47 44 43 |e card n|ame,.GDC|
|00003170| 61 72 64 4e 61 6d 65 28 | 64 72 69 76 65 72 29 2c |ardName(|driver),|
|00003180| 20 62 75 74 20 69 6e 20 | 66 61 63 74 20 67 65 74 | but in |fact get|
|00003190| 74 69 6e 67 20 74 68 65 | 20 63 61 72 64 20 6e 61 |ting the| card na|
|000031a0| 6d 65 20 69 73 20 76 65 | 72 79 20 73 6c 6f 77 20 |me is ve|ry slow |
|000031b0| 28 31 2e 35 20 6d 73 29 | 0d 77 68 65 72 65 61 73 |(1.5 ms)|.whereas|
|000031c0| 20 67 65 74 74 69 6e 67 | 20 74 68 65 20 64 72 69 | getting| the dri|
|000031d0| 76 65 72 20 6e 61 6d 65 | 20 69 73 20 66 61 73 74 |ver name| is fast|
|000031e0| 2c 20 47 44 4e 61 6d 65 | 28 64 72 69 76 65 72 29 |, GDName|(driver)|
|000031f0| 2c 20 61 6e 64 20 77 6f | 75 6c 64 20 62 65 0d 73 |, and wo|uld be.s|
|00003200| 75 66 66 69 63 69 65 6e | 74 6c 79 20 75 6e 69 71 |ufficien|tly uniq|
|00003210| 75 65 20 66 6f 72 20 6f | 75 72 20 70 75 72 70 6f |ue for o|ur purpo|
|00003220| 73 65 73 2e 20 28 45 2e | 67 2e 20 74 68 65 20 54 |ses. (E.|g. the T|
|00003230| 6f 62 79 20 61 6e 64 20 | 54 46 42 20 76 69 64 65 |oby and |TFB vide|
|00003240| 6f 20 63 61 72 64 73 20 | 68 61 76 65 0d 74 68 65 |o cards |have.the|
|00003250| 20 73 61 6d 65 20 64 72 | 69 76 65 72 2c 20 61 6e | same dr|iver, an|
|00003260| 64 20 6f 75 72 20 63 6f | 64 65 20 77 6f 72 6b 73 |d our co|de works|
|00003270| 20 66 6f 72 20 62 6f 74 | 68 20 63 61 72 64 73 2e | for bot|h cards.|
|00003280| 29 20 4e 6f 74 65 20 74 | 68 61 74 20 47 44 4e 61 |) Note t|hat GDNa|
|00003290| 6d 65 28 29 20 72 65 74 | 75 72 6e 73 0d 74 68 65 |me() ret|urns.the|
|000032a0| 20 61 64 64 72 65 73 73 | 20 6f 66 20 61 20 70 61 | address| of a pa|
|000032b0| 73 63 61 6c 20 73 74 72 | 69 6e 67 20 74 68 61 74 |scal str|ing that|
|000032c0| 20 73 68 6f 75 6c 64 20 | 6e 6f 74 20 62 65 20 6d | should |not be m|
|000032d0| 6f 64 69 66 69 65 64 2e | 0d 0d 4b 4e 4f 57 4e 20 |odified.|..KNOWN |
|000032e0| 42 55 47 53 3a 0d 48 61 | 73 20 6e 6f 74 20 62 65 |BUGS:.Ha|s not be|
|000032f0| 65 6e 20 74 65 73 74 65 | 64 20 6f 6e 20 61 6c 6c |en teste|d on all|
|00003300| 20 74 68 65 20 76 69 64 | 65 6f 20 64 65 76 69 63 | the vid|eo devic|
|00003310| 65 73 20 74 68 61 74 20 | 61 72 65 20 73 75 70 70 |es that |are supp|
|00003320| 6f 73 65 64 20 74 6f 20 | 62 65 20 73 75 70 70 6f |osed to |be suppo|
|00003330| 72 74 65 64 2e 0d 50 6c | 65 61 73 65 20 72 75 6e |rted..Pl|ease run|
|00003340| 20 74 68 65 20 64 65 6d | 6f 20 54 69 6d 65 56 69 | the dem|o TimeVi|
|00003350| 64 65 6f 2c 20 61 6e 64 | 20 73 65 6e 64 20 74 68 |deo, and| send th|
|00003360| 65 20 72 65 73 75 6c 74 | 73 20 66 69 6c 65 20 74 |e result|s file t|
|00003370| 6f 20 64 65 6e 69 73 5f | 70 65 6c 6c 69 40 69 73 |o denis_|pelli@is|
|00003380| 72 2e 73 79 72 2e 65 64 | 75 0d 0d 54 68 65 20 51 |r.syr.ed|u..The Q|
|00003390| 75 61 64 72 61 20 63 6f | 64 65 20 72 65 71 75 69 |uadra co|de requi|
|000033a0| 72 65 73 20 74 68 61 74 | 20 73 74 61 72 74 3d 3d |res that| start==|
|000033b0| 30 2e 20 54 68 69 73 20 | 63 6f 75 6c 64 20 70 72 |0. This |could pr|
|000033c0| 6f 62 61 62 6c 79 20 62 | 65 20 66 69 67 75 72 65 |obably b|e figure|
|000033d0| 64 20 6f 75 74 20 61 6e | 64 0d 66 69 78 65 64 20 |d out an|d.fixed |
|000033e0| 70 72 65 74 74 79 20 65 | 61 73 69 6c 79 20 69 66 |pretty e|asily if|
|000033f0| 20 73 6f 6d 65 6f 6e 65 | 20 74 6f 6f 6b 20 74 68 | someone| took th|
|00003400| 65 20 74 69 6d 65 20 74 | 6f 20 64 6f 20 73 6f 2e |e time t|o do so.|
|00003410| 0d 0d 54 68 65 73 65 20 | 72 6f 75 74 69 6e 65 73 |..These |routines|
|00003420| 20 64 6f 20 6e 6f 74 20 | 77 61 69 74 20 66 6f 72 | do not |wait for|
|00003430| 20 74 68 65 20 76 65 72 | 74 69 63 61 6c 20 62 6c | the ver|tical bl|
|00003440| 61 6e 6b 69 6e 67 20 69 | 6e 74 65 72 76 61 6c 20 |anking i|nterval |
|00003450| 62 65 66 6f 72 65 20 6c | 6f 61 64 69 6e 67 20 74 |before l|oading t|
|00003460| 68 65 0d 63 6c 75 74 2e | 20 4f 6e 20 6d 61 6e 79 |he.clut.| On many|
|00003470| 20 76 69 64 65 6f 20 64 | 65 76 69 63 65 73 20 74 | video d|evices t|
|00003480| 68 69 73 20 72 65 73 75 | 6c 74 73 20 69 6e 20 76 |his resu|lts in v|
|00003490| 69 73 69 62 6c 65 20 68 | 61 73 68 20 6f 6e 20 74 |isible h|ash on t|
|000034a0| 68 65 20 73 63 72 65 65 | 6e 2e 20 49 20 28 64 67 |he scree|n. I (dg|
|000034b0| 70 29 0d 63 6f 6e 73 69 | 64 65 72 20 74 68 69 73 |p).consi|der this|
|000034c0| 20 61 20 62 75 67 2c 20 | 62 75 74 2c 20 66 6f 72 | a bug, |but, for|
|000034d0| 20 6d 6f 73 74 20 6f 66 | 20 74 68 65 73 65 20 64 | most of| these d|
|000034e0| 65 76 69 63 65 73 20 49 | 20 64 6f 6e 27 74 20 6b |evices I| don't k|
|000034f0| 6e 6f 77 20 68 6f 77 20 | 74 6f 20 77 61 69 74 20 |now how |to wait |
|00003500| 66 6f 72 0d 74 68 65 20 | 65 6e 64 20 6f 66 20 66 |for.the |end of f|
|00003510| 72 61 6d 65 2c 20 73 68 | 6f 72 74 20 6f 66 20 73 |rame, sh|ort of s|
|00003520| 65 74 74 69 6e 67 20 75 | 70 20 61 6e 20 69 6e 74 |etting u|p an int|
|00003530| 65 72 72 75 70 74 2e 20 | 28 4a 75 73 74 20 61 62 |errupt. |(Just ab|
|00003540| 6f 75 74 20 65 76 65 72 | 79 20 76 69 64 65 6f 20 |out ever|y video |
|00003550| 63 61 72 64 0d 68 61 73 | 20 61 20 62 69 74 20 74 |card.has| a bit t|
|00003560| 68 61 74 20 6f 6e 65 20 | 63 6f 75 6c 64 20 6d 6f |hat one |could mo|
|00003570| 6e 69 74 6f 72 2c 20 62 | 75 74 20 69 74 73 20 61 |nitor, b|ut its a|
|00003580| 64 64 72 65 73 73 20 69 | 73 20 75 73 75 61 6c 6c |ddress i|s usuall|
|00003590| 79 20 75 6e 64 6f 63 75 | 6d 65 6e 74 65 64 2e 29 |y undocu|mented.)|
|000035a0| 20 53 6f 6d 65 0d 64 65 | 76 69 63 65 73 20 6d 61 | Some.de|vices ma|
|000035b0| 79 20 62 65 20 6f 6b 2c | 20 62 65 63 61 75 73 65 |y be ok,| because|
|000035c0| 20 6f 66 20 64 75 61 6c | 2d 70 6f 72 74 65 64 20 | of dual|-ported |
|000035d0| 52 41 4d 44 41 43 20 6d | 65 6d 6f 72 79 2c 20 6f |RAMDAC m|emory, o|
|000035e0| 72 20 68 61 72 64 77 61 | 72 65 20 62 75 66 66 65 |r hardwa|re buffe|
|000035f0| 72 69 6e 67 0d 6f 66 20 | 74 68 65 20 63 6c 75 74 |ring.of |the clut|
|00003600| 2d 6c 6f 61 64 20 72 65 | 71 75 65 73 74 2e 20 43 |-load re|quest. C|
|00003610| 68 65 63 6b 20 74 68 69 | 73 20 6f 75 74 20 6f 6e |heck thi|s out on|
|00003620| 20 79 6f 75 72 20 64 65 | 76 69 63 65 3a 20 74 72 | your de|vice: tr|
|00003630| 79 20 54 69 6d 65 56 69 | 64 65 6f 2e 0d 0d 48 49 |y TimeVi|deo...HI|
|00003640| 53 54 4f 52 59 3a 0d 38 | 2f 32 34 2f 39 32 20 4f |STORY:.8|/24/92 O|
|00003650| 72 69 67 69 6e 61 6c 20 | 73 65 74 63 61 72 64 62 |riginal |setcardb|
|00003660| 61 73 65 20 61 6e 64 20 | 6d 61 63 6c 74 73 65 74 |ase and |macltset|
|00003670| 20 70 72 6f 76 69 64 65 | 64 20 62 79 20 52 61 79 | provide|d by Ray|
|00003680| 6e 61 6c 64 20 43 6f 6d | 74 6f 69 73 0d 28 72 61 |nald Com|tois.(ra|
|00003690| 63 6f 40 77 6a 68 31 32 | 2e 68 61 72 76 61 72 64 |co@wjh12|.harvard|
|000036a0| 2e 65 64 75 29 20 74 6f | 20 44 65 6e 69 73 20 50 |.edu) to| Denis P|
|000036b0| 65 6c 6c 69 2e 0d 0d 31 | 30 2f 32 2f 39 32 20 42 |elli...1|0/2/92 B|
|000036c0| 69 6c 6c 20 48 61 61 6b | 65 20 61 64 64 65 64 20 |ill Haak|e added |
|000036d0| 63 6f 64 65 20 66 6f 72 | 20 74 68 65 20 52 61 73 |code for| the Ras|
|000036e0| 74 65 72 4f 70 73 20 50 | 72 6f 43 6f 6c 6f 72 20 |terOps P|roColor |
|000036f0| 33 32 2c 20 77 68 69 63 | 68 20 68 61 73 20 39 2d |32, whic|h has 9-|
|00003700| 62 69 74 0d 44 41 43 73 | 20 61 6e 64 20 39 2d 62 |bit.DACs| and 9-b|
|00003710| 69 74 20 65 6e 74 72 69 | 65 73 20 69 6e 20 74 68 |it entri|es in th|
|00003720| 65 20 6c 6f 6f 6b 75 70 | 20 74 61 62 6c 65 2e 0d |e lookup| table..|
|00003730| 0d 31 30 2f 31 2f 39 32 | 20 50 65 74 65 72 20 4c |.10/1/92| Peter L|
|00003740| 65 6e 6e 69 65 20 61 64 | 64 65 64 20 63 6f 64 65 |ennie ad|ded code|
|00003750| 20 66 6f 72 20 51 75 61 | 64 72 61 20 69 6e 74 65 | for Qua|dra inte|
|00003760| 72 6e 61 6c 20 76 69 64 | 65 6f 2e 20 20 4e 6f 20 |rnal vid|eo. No |
|00003770| 70 72 6f 76 69 73 69 6f | 6e 20 66 6f 72 0d 63 68 |provisio|n for.ch|
|00003780| 61 6e 67 69 6e 67 20 74 | 68 65 20 73 74 61 72 74 |anging t|he start|
|00003790| 20 70 6f 73 69 74 69 6f | 6e 20 69 6e 20 74 68 65 | positio|n in the|
|000037a0| 20 74 61 62 6c 65 2c 20 | 28 49 20 63 6f 75 6c 64 | table, |(I could|
|000037b0| 6e 27 74 20 66 69 6e 64 | 20 61 6e 79 20 72 65 6c |n't find| any rel|
|000037c0| 65 76 61 6e 74 0d 64 69 | 73 61 73 73 65 6d 62 6c |evant.di|sassembl|
|000037d0| 79 29 20 73 6f 20 27 73 | 74 61 72 74 27 20 69 73 |y) so 's|tart' is|
|000037e0| 20 69 67 6e 6f 72 65 64 | 2c 20 61 6e 64 20 79 6f | ignored|, and yo|
|000037f0| 75 20 73 68 6f 75 6c 64 | 20 77 72 69 74 65 20 74 |u should| write t|
|00003800| 68 65 20 77 68 6f 6c 65 | 20 74 61 62 6c 65 2e 0d |he whole| table..|
|00003810| 09 0d 39 2f 33 30 2f 39 | 32 20 42 69 6c 6c 20 48 |..9/30/9|2 Bill H|
|00003820| 61 61 6b 65 20 26 20 50 | 65 74 65 72 20 4c 65 6e |aake & P|eter Len|
|00003830| 6e 69 65 20 6d 6f 64 69 | 66 69 65 64 20 74 68 65 |nie modi|fied the|
|00003840| 20 63 6f 64 65 20 66 6f | 72 20 74 68 65 20 38 78 | code fo|r the 8x|
|00003850| 32 34 20 63 61 72 64 0d | 61 6e 64 20 74 68 65 20 |24 card.|and the |
|00003860| 38 78 32 34 47 43 20 74 | 6f 20 6d 61 6b 65 20 69 |8x24GC t|o make i|
|00003870| 74 20 61 29 20 77 6f 72 | 6b 20 70 72 6f 70 65 72 |t a) wor|k proper|
|00003880| 6c 79 20 69 6e 20 33 32 | 2d 62 69 74 20 6d 6f 64 |ly in 32|-bit mod|
|00003890| 65 2e 20 62 29 20 74 6f | 20 66 69 78 20 61 20 62 |e. b) to| fix a b|
|000038a0| 75 67 0d 28 66 65 61 74 | 75 72 65 3f 29 20 6f 66 |ug.(feat|ure?) of|
|000038b0| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 64 72 | the ori|ginal dr|
|000038c0| 69 76 65 72 73 20 74 68 | 61 74 20 70 72 65 76 65 |ivers th|at preve|
|000038d0| 6e 74 65 64 20 74 68 65 | 20 63 61 72 64 73 20 72 |nted the| cards r|
|000038e0| 75 6e 6e 69 6e 67 20 6f | 6e 20 61 20 51 75 61 64 |unning o|n a Quad|
|000038f0| 72 61 2e 0d 54 68 65 20 | 64 72 69 76 65 72 73 20 |ra..The |drivers |
|00003900| 65 78 70 6c 6f 69 74 20 | 27 62 79 74 65 2d 73 6d |exploit |'byte-sm|
|00003910| 65 61 72 69 6e 67 27 20 | 6f 6e 20 74 68 65 20 36 |earing' |on the 6|
|00003920| 38 30 32 30 20 61 6e 64 | 20 36 38 30 33 30 20 28 |8020 and| 68030 (|
|00003930| 54 65 63 68 20 4e 6f 74 | 65 20 32 38 32 29 2e 20 |Tech Not|e 282). |
|00003940| 54 68 69 73 0d 6d 65 61 | 6e 73 20 74 68 61 74 20 |This.mea|ns that |
|00003950| 6f 6e 65 20 63 61 6e 20 | 6d 6f 76 65 20 61 20 62 |one can |move a b|
|00003960| 79 74 65 20 74 6f 20 74 | 68 65 20 6c 6f 77 65 73 |yte to t|he lowes|
|00003970| 74 20 62 79 74 65 20 61 | 64 64 72 65 73 73 20 6f |t byte a|ddress o|
|00003980| 66 20 74 68 65 20 64 61 | 74 61 20 72 65 67 69 73 |f the da|ta regis|
|00003990| 74 65 72 0d 6f 6e 20 74 | 68 65 20 63 61 72 64 2c |ter.on t|he card,|
|000039a0| 20 77 68 65 6e 20 6f 6e | 65 20 61 63 74 75 61 6c | when on|e actual|
|000039b0| 6c 79 20 77 61 6e 74 73 | 20 74 6f 20 70 75 74 20 |ly wants| to put |
|000039c0| 69 74 20 61 74 20 61 64 | 64 72 65 73 73 2b 33 20 |it at ad|dress+3 |
|000039d0| 28 21 21 29 2e 20 54 68 | 65 20 66 75 6e 63 74 69 |(!!). Th|e functi|
|000039e0| 6f 6e 73 0d 77 6f 72 6b | 20 66 6f 72 20 61 6c 6c |ons.work| for all|
|000039f0| 20 74 68 65 20 63 61 72 | 64 73 20 28 65 78 63 65 | the car|ds (exce|
|00003a00| 70 74 20 74 6f 62 79 2c | 20 77 68 69 63 68 20 68 |pt toby,| which h|
|00003a10| 61 73 6e 27 74 20 62 65 | 65 6e 20 74 65 73 74 65 |asn't be|en teste|
|00003a20| 64 29 20 61 6e 64 20 6f | 6e 20 69 6e 74 65 72 6e |d) and o|n intern|
|00003a30| 61 6c 0d 76 69 64 65 6f | 20 69 6e 20 62 6f 74 68 |al.video| in both|
|00003a40| 20 32 34 20 61 6e 64 20 | 33 32 20 62 69 74 20 6d | 24 and |32 bit m|
|00003a50| 6f 64 65 20 6f 6e 20 51 | 75 61 64 72 61 20 37 30 |ode on Q|uadra 70|
|00003a60| 30 2f 39 35 30 2c 20 49 | 49 66 78 20 6f 72 20 63 |0/950, I|Ifx or c|
|00003a70| 69 20 72 75 6e 6e 69 6e | 67 20 73 79 73 74 65 6d |i runnin|g system|
|00003a80| 0d 37 2e 30 2e 31 2e 0d | 09 0d 39 2f 32 38 2f 39 |.7.0.1..|..9/28/9|
|00003a90| 32 20 50 65 74 65 72 20 | 4c 65 6e 6e 69 65 20 61 |2 Peter |Lennie a|
|00003aa0| 64 64 65 64 20 74 68 65 | 20 66 75 6e 63 74 69 6f |dded the| functio|
|00003ab0| 6e 20 66 69 6e 64 63 61 | 72 64 2e 0d 0d 31 31 2f |n findca|rd...11/|
|00003ac0| 32 33 2f 39 32 20 44 65 | 6e 69 73 20 50 65 6c 6c |23/92 De|nis Pell|
|00003ad0| 69 20 28 64 67 70 29 20 | 65 6c 69 6d 69 6e 61 74 |i (dgp) |eliminat|
|00003ae0| 65 64 20 61 6c 6c 20 67 | 6c 6f 62 61 6c 73 20 62 |ed all g|lobals b|
|00003af0| 65 63 61 75 73 65 20 74 | 68 65 79 20 69 6d 70 6c |ecause t|hey impl|
|00003b00| 69 63 69 74 6c 79 0d 61 | 73 73 75 6d 65 64 20 74 |icitly.a|ssumed t|
|00003b10| 68 61 74 20 74 68 65 72 | 65 20 69 73 20 6f 6e 6c |hat ther|e is onl|
|00003b20| 79 20 6f 6e 65 20 76 69 | 64 65 6f 20 64 65 76 69 |y one vi|deo devi|
|00003b30| 63 65 2e 20 41 6c 6c 20 | 72 6f 75 74 69 6e 65 73 |ce. All |routines|
|00003b40| 20 6e 6f 77 20 61 63 63 | 65 70 74 20 61 20 47 44 | now acc|ept a GD|
|00003b50| 48 61 6e 64 6c 65 0d 73 | 70 65 63 69 66 79 69 6e |Handle.s|pecifyin|
|00003b60| 67 20 77 68 69 63 68 20 | 76 69 64 65 6f 20 64 65 |g which |video de|
|00003b70| 76 69 63 65 2e 20 53 69 | 6d 70 6c 69 66 69 65 64 |vice. Si|mplified|
|00003b80| 20 74 68 65 20 6c 6f 67 | 69 63 20 6f 66 20 47 65 | the log|ic of Ge|
|00003b90| 74 43 61 72 64 42 61 73 | 65 28 29 2c 20 6d 69 6e |tCardBas|e(), min|
|00003ba0| 69 6d 69 7a 69 6e 67 0d | 74 68 65 20 64 65 70 65 |imizing.|the depe|
|00003bb0| 6e 64 65 6e 63 65 20 6f | 6e 20 63 61 72 64 20 74 |ndence o|n card t|
|00003bc0| 79 70 65 2e 0d 0d 31 31 | 2f 32 35 2f 39 32 20 64 |ype...11|/25/92 d|
|00003bd0| 67 70 20 57 68 65 6e 20 | 55 53 45 5f 4d 53 42 20 |gp When |USE_MSB |
|00003be0| 69 73 20 74 72 75 65 20 | 61 6c 6c 20 74 68 65 20 |is true |all the |
|00003bf0| 72 6f 75 74 69 6e 65 73 | 20 6e 6f 77 20 75 73 65 |routines| now use|
|00003c00| 20 74 68 65 20 6d 6f 73 | 74 20 73 69 67 6e 69 66 | the mos|t signif|
|00003c10| 69 63 61 6e 74 0d 62 69 | 74 73 20 6f 66 20 74 68 |icant.bi|ts of th|
|00003c20| 65 20 31 36 2d 62 69 74 | 20 65 6c 65 6d 65 6e 74 |e 16-bit| element|
|00003c30| 73 20 6f 66 20 74 68 65 | 20 75 73 65 72 2d 73 75 |s of the| user-su|
|00003c40| 70 70 6c 69 65 64 20 63 | 6f 6c 6f 72 20 74 61 62 |pplied c|olor tab|
|00003c50| 6c 65 73 2e 20 57 68 65 | 6e 20 69 74 20 69 73 20 |les. Whe|n it is |
|00003c60| 66 61 6c 73 65 0d 74 68 | 65 20 6c 65 61 73 74 20 |false.th|e least |
|00003c70| 73 69 67 6e 69 66 69 63 | 61 6e 74 20 62 69 74 73 |signific|ant bits|
|00003c80| 20 61 72 65 20 75 73 65 | 64 2e 20 54 68 69 73 20 | are use|d. This |
|00003c90| 69 73 20 6d 6f 73 74 6c | 79 20 69 6d 70 6c 65 6d |is mostl|y implem|
|00003ca0| 65 6e 74 65 64 20 62 79 | 20 6f 66 66 73 65 74 69 |ented by| offseti|
|00003cb0| 6e 67 20 74 68 65 0d 74 | 61 62 6c 65 20 70 6f 69 |ng the.t|able poi|
|00003cc0| 6e 74 65 72 73 20 62 79 | 20 6f 6e 65 20 62 79 74 |nters by| one byt|
|00003cd0| 65 20 61 6e 64 20 6f 6e | 6c 79 20 72 65 61 64 69 |e and on|ly readi|
|00003ce0| 6e 67 20 74 68 65 20 64 | 65 73 69 72 65 64 20 62 |ng the d|esired b|
|00003cf0| 79 74 65 2e 20 a5 47 65 | 6e 65 72 61 6c 69 7a 65 |yte. .Ge|neralize|
|00003d00| 64 0d 6d 61 63 6c 74 73 | 65 74 28 29 20 74 6f 20 |d.maclts|et() to |
|00003d10| 77 6f 72 6b 20 77 69 74 | 68 20 74 61 62 6c 65 73 |work wit|h tables|
|00003d20| 20 74 68 61 74 20 68 61 | 76 65 20 61 6e 20 61 72 | that ha|ve an ar|
|00003d30| 62 69 74 72 61 72 79 20 | 65 6c 65 6d 65 6e 74 20 |bitrary |element |
|00003d40| 73 70 61 63 69 6e 67 2e | 20 54 68 69 73 0d 61 6c |spacing.| This.al|
|00003d50| 6c 6f 77 73 20 69 74 20 | 74 6f 20 77 6f 72 6b 20 |lows it |to work |
|00003d60| 77 69 74 68 20 62 6f 74 | 68 20 77 69 74 68 20 52 |with bot|h with R|
|00003d70| 61 79 6e 61 6c 64 27 73 | 20 63 6f 6e 76 65 6e 74 |aynald's| convent|
|00003d80| 69 6f 6e 20 6f 66 20 74 | 68 72 65 65 20 61 72 72 |ion of t|hree arr|
|00003d90| 61 79 73 20 6f 66 20 73 | 68 6f 72 74 73 2c 0d 61 |ays of s|horts,.a|
|00003da0| 6e 64 20 74 68 65 20 41 | 70 70 6c 65 20 63 6f 6e |nd the A|pple con|
|00003db0| 76 65 6e 74 69 6f 6e 20 | 6f 66 20 61 20 43 6f 6c |vention |of a Col|
|00003dc0| 6f 72 53 70 65 63 20 61 | 72 72 61 79 2c 20 65 61 |orSpec a|rray, ea|
|00003dd0| 63 68 20 65 6c 65 6d 65 | 6e 74 20 6f 66 20 77 68 |ch eleme|nt of wh|
|00003de0| 69 63 68 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 0d |ich cons|ists of.|
|00003df0| 72 65 64 2c 20 67 72 65 | 65 6e 2c 20 62 6c 75 65 |red, gre|en, blue|
|00003e00| 2c 20 61 6e 64 20 76 61 | 6c 75 65 20 28 77 68 69 |, and va|lue (whi|
|00003e10| 63 68 20 69 73 20 6e 6f | 74 20 75 73 65 64 29 2e |ch is no|t used).|
|00003e20| 20 a5 41 64 64 65 64 20 | 61 6c 69 61 73 20 22 54 | .Added |alias "T|
|00003e30| 6f 62 79 20 66 72 61 6d | 65 20 62 75 66 66 65 72 |oby fram|e buffer|
|00003e40| 0d 63 61 72 64 22 20 66 | 6f 72 20 74 6f 62 79 63 |.card" f|or tobyc|
|00003e50| 61 72 64 2e 0d 0d 31 31 | 2f 32 37 2f 39 32 20 64 |ard...11|/27/92 d|
|00003e60| 67 70 20 42 72 6f 6b 65 | 20 6f 75 74 20 74 68 65 |gp Broke| out the|
|00003e70| 20 63 6f 64 65 20 66 6f | 72 20 65 61 63 68 20 63 | code fo|r each c|
|00003e80| 61 72 64 20 69 6e 74 6f | 20 73 65 70 61 72 61 74 |ard into| separat|
|00003e90| 65 20 73 75 62 72 6f 75 | 74 69 6e 65 73 2e 20 54 |e subrou|tines. T|
|00003ea0| 68 69 73 0d 61 6c 6c 6f | 77 73 20 6f 70 74 69 6d |his.allo|ws optim|
|00003eb0| 61 6c 20 72 65 67 69 73 | 74 65 72 20 61 73 73 69 |al regis|ter assi|
|00003ec0| 67 6e 6d 65 6e 74 20 66 | 6f 72 20 65 61 63 68 20 |gnment f|or each |
|00003ed0| 72 6f 75 74 69 6e 65 2c | 20 61 6e 64 20 6d 61 6b |routine,| and mak|
|00003ee0| 65 73 20 69 74 20 65 61 | 73 69 65 72 20 74 6f 20 |es it ea|sier to |
|00003ef0| 72 65 61 64 0d 74 68 65 | 20 54 48 49 4e 4b 20 43 |read.the| THINK C|
|00003f00| 20 64 69 73 61 73 73 65 | 6d 62 6c 65 72 20 6f 75 | disasse|mbler ou|
|00003f10| 74 70 75 74 2e 20 54 68 | 65 20 72 75 6e 74 69 6d |tput. Th|e runtim|
|00003f20| 65 20 6f 76 65 72 68 65 | 61 64 20 6f 66 20 6c 6f |e overhe|ad of lo|
|00003f30| 61 64 69 6e 67 20 61 6e | 64 20 75 6e 6c 6f 61 64 |ading an|d unload|
|00003f40| 69 6e 67 0d 74 68 65 20 | 73 74 61 63 6b 20 69 73 |ing.the |stack is|
|00003f50| 20 6e 65 67 6c 69 67 69 | 62 6c 65 2c 20 61 6e 64 | negligi|ble, and|
|00003f60| 20 63 6f 75 6c 64 20 62 | 65 20 65 6c 69 6d 69 6e | could b|e elimin|
|00003f70| 61 74 65 64 20 65 6e 74 | 69 72 65 6c 79 20 62 79 |ated ent|irely by|
|00003f80| 20 70 75 74 74 69 6e 67 | 20 61 6c 6c 20 74 68 65 | putting| all the|
|00003f90| 0d 70 61 72 61 6d 65 74 | 65 72 73 20 69 6e 20 61 |.paramet|ers in a|
|00003fa0| 20 73 74 72 75 63 74 75 | 72 65 20 61 6e 64 20 70 | structu|re and p|
|00003fb0| 61 73 73 69 6e 67 20 61 | 20 70 6f 69 6e 74 65 72 |assing a| pointer|
|00003fc0| 20 74 6f 20 69 74 2e 20 | a5 41 64 64 65 64 20 61 | to it. |.Added a|
|00003fd0| 20 66 6c 61 67 2c 0d 73 | 75 73 70 65 6e 64 49 6e | flag,.s|uspendIn|
|00003fe0| 74 65 72 72 75 70 74 73 | 2c 20 74 6f 20 6d 61 6b |terrupts|, to mak|
|00003ff0| 65 20 69 6e 74 65 72 72 | 75 70 74 20 73 75 73 70 |e interr|upt susp|
|00004000| 65 6e 73 69 6f 6e 20 6f | 70 74 69 6f 6e 61 6c 20 |ension o|ptional |
|00004010| 73 69 6e 63 65 20 69 74 | 20 6d 61 79 20 62 65 0d |since it| may be.|
|00004020| 75 6e 64 65 73 69 72 61 | 62 6c 65 20 69 6e 20 73 |undesira|ble in s|
|00004030| 6f 6d 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |ome appl|ications|
|00004040| 2e 20 28 42 6c 6f 63 6b | 69 6e 67 20 69 6e 74 65 |. (Block|ing inte|
|00004050| 72 72 75 70 74 73 20 66 | 6f 72 20 31 20 6d 73 20 |rrupts f|or 1 ms |
|00004060| 63 6f 75 6c 64 20 63 61 | 75 73 65 20 79 6f 75 0d |could ca|use you.|
|00004070| 74 6f 20 6d 69 73 73 20 | 74 68 65 20 69 6e 74 65 |to miss |the inte|
|00004080| 72 72 75 70 74 20 66 72 | 6f 6d 20 61 20 76 69 64 |rrupt fr|om a vid|
|00004090| 65 6f 20 63 61 72 64 2c | 20 65 73 70 65 63 69 61 |eo card,| especia|
|000040a0| 6c 6c 79 20 69 66 20 79 | 6f 75 20 61 72 65 20 74 |lly if y|ou are t|
|000040b0| 72 79 69 6e 67 20 74 6f | 20 6b 65 65 70 0d 74 72 |rying to| keep.tr|
|000040c0| 61 63 6b 20 6f 66 20 69 | 6e 74 65 72 72 75 70 74 |ack of i|nterrupt|
|000040d0| 73 20 6f 6e 20 73 65 76 | 65 72 61 6c 20 76 69 64 |s on sev|eral vid|
|000040e0| 65 6f 20 63 61 72 64 73 | 20 61 74 20 6f 6e 63 65 |eo cards| at once|
|000040f0| 2e 29 0d 0d 31 31 2f 33 | 30 2f 39 32 20 64 67 70 |.)..11/3|0/92 dgp|
|00004100| 20 57 72 6f 74 65 20 54 | 65 73 74 43 6c 75 74 73 | Wrote T|estCluts|
|00004110| 2c 20 77 68 69 63 68 20 | 72 65 61 64 73 20 62 61 |, which |reads ba|
|00004120| 63 6b 20 74 68 65 20 63 | 6c 75 74 20 61 6e 64 20 |ck the c|lut and |
|00004130| 63 68 65 63 6b 73 20 61 | 6c 6c 0d 76 61 6c 75 65 |checks a|ll.value|
|00004140| 73 2c 20 61 6e 64 20 75 | 73 65 64 20 69 74 20 74 |s, and u|sed it t|
|00004150| 6f 20 74 65 73 74 20 53 | 65 74 45 6e 74 72 69 65 |o test S|etEntrie|
|00004160| 73 51 75 69 63 6b 6c 79 | 28 29 20 6f 6e 20 51 75 |sQuickly|() on Qu|
|00004170| 61 64 72 61 20 39 35 30 | 20 69 6e 74 65 72 6e 61 |adra 950| interna|
|00004180| 6c 20 76 69 64 65 6f 2c | 0d 4d 61 63 20 49 49 63 |l video,|.Mac IIc|
|00004190| 69 20 69 6e 74 65 72 6e | 61 6c 20 76 69 64 65 6f |i intern|al video|
|000041a0| 2c 20 68 69 72 65 73 63 | 61 72 64 2c 20 22 54 6f |, hiresc|ard, "To|
|000041b0| 62 79 20 66 72 61 6d 65 | 20 62 75 66 66 65 72 20 |by frame| buffer |
|000041c0| 63 61 72 64 22 2c 20 61 | 6e 64 20 38 a5 32 34 20 |card", a|nd 8.24 |
|000041d0| 63 61 72 64 20 61 74 0d | 61 6c 6c 20 64 65 70 74 |card at.|all dept|
|000041e0| 68 73 2c 20 66 6f 72 20 | 62 6f 74 68 20 32 34 2d |hs, for |both 24-|
|000041f0| 20 61 6e 64 20 33 32 2d | 62 69 74 20 61 64 64 72 | and 32-|bit addr|
|00004200| 65 73 73 69 6e 67 2e 20 | 54 6f 62 79 20 63 61 72 |essing. |Toby car|
|00004210| 64 20 77 61 73 20 74 65 | 73 74 65 64 20 6f 6e 20 |d was te|sted on |
|00004220| 36 38 30 32 30 2c 0d 36 | 38 30 33 30 2c 20 61 6e |68020,.6|8030, an|
|00004230| 64 20 36 38 30 34 30 20 | 70 72 6f 63 65 73 73 6f |d 68040 |processo|
|00004240| 72 73 2e 20 a5 57 72 6f | 74 65 20 64 6f 63 75 6d |rs. .Wro|te docum|
|00004250| 65 6e 74 61 74 69 6f 6e | 2e 20 a5 52 65 70 6c 61 |entation|. .Repla|
|00004260| 63 65 64 20 63 6f 6d 70 | 69 6c 65 2d 74 69 6d 65 |ced comp|ile-time|
|00004270| 20 63 6f 6e 73 74 61 6e | 74 73 0d 55 53 45 5f 4d | constan|ts.USE_M|
|00004280| 53 42 20 61 6e 64 20 50 | 52 4f 5f 38 42 49 54 53 |SB and P|RO_8BITS|
|00004290| 20 62 79 20 72 75 6e 74 | 69 6d 65 20 66 6c 61 67 | by runt|ime flag|
|000042a0| 73 20 70 61 73 73 65 64 | 20 61 73 20 61 72 67 75 |s passed| as argu|
|000042b0| 6d 65 6e 74 73 2e 20 a5 | 41 64 64 65 64 20 57 61 |ments. .|Added Wa|
|000042c0| 69 74 46 6f 72 4e 65 78 | 74 42 6c 61 6e 6b 69 6e |itForNex|tBlankin|
|000042d0| 67 28 29 0d 62 61 73 65 | 64 20 6f 6e 20 63 6f 64 |g().base|d on cod|
|000042e0| 65 20 66 72 6f 6d 20 56 | 69 64 65 6f 54 46 42 2e |e from V|ideoTFB.|
|000042f0| 63 2e 0d 0d 31 32 2f 33 | 2f 39 32 20 64 67 70 20 |c...12/3|/92 dgp |
|00004300| 49 6e 63 6f 72 70 6f 72 | 61 74 65 64 20 50 65 74 |Incorpor|ated Pet|
|00004310| 65 72 20 4c 65 6e 6e 69 | 65 27 73 20 63 6f 72 72 |er Lenni|e's corr|
|00004320| 65 63 74 69 6f 6e 73 20 | 61 6e 64 20 61 64 64 69 |ections |and addi|
|00004330| 74 69 6f 6e 73 20 74 6f | 20 74 68 65 20 63 6f 6d |tions to| the com|
|00004340| 6d 65 6e 74 73 20 61 62 | 6f 76 65 2e 0d 0d 31 32 |ments ab|ove...12|
|00004350| 2f 38 2f 39 32 20 64 67 | 70 20 41 64 64 65 64 20 |/8/92 dg|p Added |
|00004360| 6d 69 73 73 69 6e 67 20 | 22 63 61 73 65 22 20 74 |missing |"case" t|
|00004370| 6f 20 73 77 69 74 63 68 | 20 69 6e 20 57 61 69 74 |o switch| in Wait|
|00004380| 46 6f 72 4e 65 78 74 42 | 6c 61 6e 6b 69 6e 67 2e |ForNextB|lanking.|
|00004390| 0d 0d 31 32 2f 31 33 2f | 39 32 20 64 67 70 20 43 |..12/13/|92 dgp C|
|000043a0| 68 61 6e 67 65 64 20 65 | 72 72 6f 6e 65 6f 75 73 |hanged e|rroneous|
|000043b0| 20 22 26 64 22 20 74 6f | 20 22 25 64 22 20 69 6e | "&d" to| "%d" in|
|000043c0| 20 61 20 70 72 69 6e 74 | 66 2e 20 41 64 64 65 64 | a print|f. Added|
|000043d0| 20 73 6f 6d 65 20 63 6f | 6d 6d 65 6e 74 73 20 74 | some co|mments t|
|000043e0| 6f 0d 74 68 65 20 64 6f | 63 75 6d 65 6e 74 61 74 |o.the do|cumentat|
|000043f0| 69 6f 6e 20 61 62 6f 76 | 65 2e 0d 09 09 09 0d 31 |ion abov|e......1|
|00004400| 32 2f 31 35 2f 39 32 20 | 64 67 70 20 4e 6f 77 20 |2/15/92 |dgp Now |
|00004410| 67 65 74 20 6d 6f 64 65 | 20 66 72 6f 6d 20 64 65 |get mode| from de|
|00004420| 76 69 63 65 20 72 65 63 | 6f 72 64 20 61 6e 64 20 |vice rec|ord and |
|00004430| 6c 65 61 76 65 20 69 74 | 20 69 6e 20 73 74 61 6e |leave it| in stan|
|00004440| 64 61 72 64 20 66 6f 72 | 6d 2c 20 0d 69 2e 65 2e |dard for|m, .i.e.|
|00004450| 20 77 69 74 68 20 74 68 | 65 20 30 78 38 30 20 62 | with th|e 0x80 b|
|00004460| 69 74 20 73 65 74 2c 20 | 61 6e 64 20 6f 6e 6c 79 |it set, |and only|
|00004470| 20 73 74 72 69 70 20 6f | 66 66 20 74 68 61 74 20 | strip o|ff that |
|00004480| 62 69 74 20 77 68 65 6e | 20 61 63 74 75 61 6c 6c |bit when| actuall|
|00004490| 79 20 6e 65 63 65 73 73 | 61 72 79 2c 0d 65 2e 67 |y necess|ary,.e.g|
|000044a0| 2e 20 69 6e 20 4c 6f 61 | 64 43 6c 75 74 4d 61 63 |. in Loa|dClutMac|
|000044b0| 49 49 63 69 2e 20 54 68 | 69 73 20 61 6c 6c 6f 77 |IIci. Th|is allow|
|000044c0| 73 20 63 6f 6d 70 61 72 | 69 73 6f 6e 20 77 69 74 |s compar|ison wit|
|000044d0| 68 20 41 70 70 6c 65 27 | 73 20 70 72 65 64 65 66 |h Apple'|s predef|
|000044e0| 69 6e 65 64 20 6d 6f 64 | 65 0d 76 61 6c 75 65 73 |ined mod|e.values|
|000044f0| 2c 20 6f 6e 65 42 69 74 | 4d 6f 64 65 2c 20 65 74 |, oneBit|Mode, et|
|00004500| 63 2e 2c 20 74 68 6f 75 | 67 68 20 74 68 61 74 20 |c., thou|gh that |
|00004510| 69 73 20 64 6f 6e 65 20 | 68 65 72 65 20 61 74 20 |is done |here at |
|00004520| 70 72 65 73 65 6e 74 2e | 20 48 6f 77 65 76 65 72 |present.| However|
|00004530| 2c 20 6f 72 64 65 72 65 | 64 0d 63 6f 6d 70 61 72 |, ordere|d.compar|
|00004540| 69 73 6f 6e 73 20 77 6f | 75 6c 64 20 67 69 76 65 |isons wo|uld give|
|00004550| 20 6d 6f 72 65 20 69 6e | 74 75 69 74 69 76 65 20 | more in|tuitive |
|00004560| 72 65 73 75 6c 74 73 20 | 69 66 20 6d 6f 64 65 20 |results |if mode |
|00004570| 77 65 72 65 20 64 65 63 | 6c 61 72 65 64 20 61 73 |were dec|lared as|
|00004580| 20 6c 6f 6e 67 2c 20 73 | 6f 0d 74 68 61 74 20 74 | long, s|o.that t|
|00004590| 68 65 20 73 69 67 6e 20 | 62 69 74 20 77 6f 75 6c |he sign |bit woul|
|000045a0| 64 20 6e 6f 74 20 62 65 | 20 73 65 74 2e 0d 0d 31 |d not be| set...1|
|000045b0| 32 2f 33 30 2f 39 32 20 | 64 67 70 20 4d 61 6b 65 |2/30/92 |dgp Make|
|000045c0| 20 73 75 72 65 20 72 6f | 75 74 69 6e 65 73 20 72 | sure ro|utines r|
|000045d0| 65 74 75 72 6e 20 7a 65 | 72 6f 20 77 68 65 6e 20 |eturn ze|ro when |
|000045e0| 74 68 65 72 65 27 73 20 | 6e 6f 20 65 72 72 6f 72 |there's |no error|
|000045f0| 2e 0d 0d 31 2f 36 2f 39 | 33 20 64 67 70 20 48 61 |...1/6/9|3 dgp Ha|
|00004600| 6e 64 6c 65 20 47 44 47 | 65 74 47 61 6d 6d 61 20 |ndle GDG|etGamma |
|00004610| 66 61 69 6c 75 72 65 20 | 67 72 61 63 65 66 75 6c |failure |graceful|
|00004620| 6c 79 2c 20 6a 75 73 74 | 20 67 75 65 73 73 20 61 |ly, just| guess a|
|00004630| 74 20 74 68 65 20 64 61 | 63 53 69 7a 65 2e 20 0d |t the da|cSize. .|
|00004640| 0d 32 2f 31 35 2f 39 33 | 09 64 67 70 20 52 65 77 |.2/15/93|.dgp Rew|
|00004650| 72 6f 74 65 20 6e 6f 6e | 77 6f 72 6b 69 6e 67 20 |rote non|working |
|00004660| 4c 6f 61 64 43 6c 75 74 | 54 6f 62 79 20 69 6e 20 |LoadClut|Toby in |
|00004670| 43 2c 20 61 6e 64 20 6d | 61 64 65 20 69 74 20 77 |C, and m|ade it w|
|00004680| 6f 72 6b 2e 20 52 65 77 | 72 6f 74 65 0d 6e 6f 6e |ork. Rew|rote.non|
|00004690| 77 6f 72 6b 69 6e 67 20 | 4c 6f 61 64 43 6c 75 74 |working |LoadClut|
|000046a0| 78 38 32 34 20 69 6e 20 | 43 2c 20 61 6e 64 20 6d |x824 in |C, and m|
|000046b0| 61 64 65 20 69 74 20 77 | 6f 72 6b 2e 20 46 69 78 |ade it w|ork. Fix|
|000046c0| 65 64 20 73 69 78 74 65 | 65 6e 42 69 74 4d 6f 64 |ed sixte|enBitMod|
|000046d0| 65 20 69 6e 0d 4c 6f 61 | 64 43 6c 75 74 51 75 61 |e in.Loa|dClutQua|
|000046e0| 64 72 61 2e 20 55 73 65 | 20 6e 65 77 20 53 77 61 |dra. Use| new Swa|
|000046f0| 70 50 72 69 6f 72 69 74 | 79 20 69 6e 73 74 65 61 |pPriorit|y instea|
|00004700| 64 20 6f 66 20 47 65 74 | 2f 53 65 74 50 72 69 6f |d of Get|/SetPrio|
|00004710| 72 69 74 79 2e 0d 0d 32 | 2f 32 30 2f 39 33 09 64 |rity...2|/20/93.d|
|00004720| 67 70 09 54 72 61 6e 73 | 6c 61 74 65 64 20 4c 6f |gp.Trans|lated Lo|
|00004730| 61 64 43 6c 75 74 47 43 | 78 38 32 34 20 74 6f 20 |adClutGC|x824 to |
|00004740| 43 2e 20 28 49 74 20 77 | 61 73 20 69 67 6e 6f 72 |C. (It w|as ignor|
|00004750| 69 6e 67 20 74 68 65 20 | 73 74 61 72 74 20 76 61 |ing the |start va|
|00004760| 6c 75 65 2e 29 0d 0d 33 | 2f 34 2f 39 33 09 64 67 |lue.)..3|/4/93.dg|
|00004770| 70 09 41 64 64 65 64 20 | 6d 61 63 49 49 73 69 20 |p.Added |macIIsi |
|00004780| 74 6f 20 6c 69 73 74 20 | 6f 66 20 73 75 70 70 6f |to list |of suppo|
|00004790| 72 74 65 64 20 63 61 72 | 64 73 2c 20 73 69 6e 63 |rted car|ds, sinc|
|000047a0| 65 20 69 74 20 75 73 65 | 73 20 74 68 65 20 73 61 |e it use|s the sa|
|000047b0| 6d 65 0d 64 72 69 76 65 | 72 20 61 73 20 74 68 65 |me.drive|r as the|
|000047c0| 20 4d 61 63 20 49 49 63 | 69 2e 20 43 68 61 6e 67 | Mac IIc|i. Chang|
|000047d0| 65 64 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6f |ed defin|itions o|
|000047e0| 66 20 73 74 72 69 6e 67 | 20 74 79 70 65 73 20 73 |f string| types s|
|000047f0| 6c 69 67 68 74 6c 79 20 | 74 6f 20 61 6c 6c 6f 77 |lightly |to allow|
|00004800| 0d 63 6f 6d 70 69 6c 61 | 74 69 6f 6e 20 6f 66 20 |.compila|tion of |
|00004810| 74 68 69 73 20 66 69 6c | 65 20 61 73 20 61 20 63 |this fil|e as a c|
|00004820| 6f 64 65 20 72 65 73 6f | 75 72 63 65 2e 20 48 6f |ode reso|urce. Ho|
|00004830| 77 65 76 65 72 2c 20 74 | 68 65 20 61 73 73 65 6d |wever, t|he assem|
|00004840| 62 6c 79 20 63 6f 64 65 | 0d 75 73 65 73 20 6d 6f |bly code|.uses mo|
|00004850| 72 65 20 72 65 67 69 73 | 74 65 72 73 20 74 68 61 |re regis|ters tha|
|00004860| 6e 20 61 72 65 20 61 76 | 61 69 6c 61 62 6c 65 20 |n are av|ailable |
|00004870| 74 6f 20 61 20 63 6f 64 | 65 20 72 65 73 6f 75 72 |to a cod|e resour|
|00004880| 63 65 2e 0d 2a 2f 0d 23 | 69 6e 63 6c 75 64 65 20 |ce..*/.#|include |
|00004890| 22 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 22 |"VideoTo|olbox.h"|
|000048a0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 61 73 73 65 72 |.#includ|e <asser|
|000048b0| 74 2e 68 3e 0d 23 64 65 | 66 69 6e 65 20 55 53 45 |t.h>.#de|fine USE|
|000048c0| 5f 4f 4e 4c 59 5f 38 5f | 42 49 54 53 5f 49 4e 5f |_ONLY_8_|BITS_IN_|
|000048d0| 4d 41 43 4c 54 53 45 54 | 20 30 09 2f 2f 20 31 20 |MACLTSET| 0.// 1 |
|000048e0| 74 6f 20 75 73 65 20 52 | 61 73 74 65 72 4f 70 73 |to use R|asterOps|
|000048f0| 20 50 72 6f 43 6f 6c 6f | 72 33 32 20 61 73 20 61 | ProColo|r32 as a|
|00004900| 6e 20 38 2d 62 69 74 20 | 44 41 43 2e 0d 23 64 65 |n 8-bit |DAC..#de|
|00004910| 66 69 6e 65 20 43 5f 43 | 4f 44 45 20 31 09 2f 2f |fine C_C|ODE 1.//|
|00004920| 20 75 73 65 20 43 20 63 | 6f 64 65 20 74 6f 20 6c | use C c|ode to l|
|00004930| 6f 61 64 20 63 6c 75 74 | 2c 20 69 6e 73 74 65 61 |oad clut|, instea|
|00004940| 64 20 6f 66 20 61 73 73 | 65 6d 62 6c 79 2e 0d 09 |d of ass|embly...|
|00004950| 09 09 09 09 2f 2f 20 54 | 68 65 20 43 20 63 6f 64 |....// T|he C cod|
|00004960| 65 20 69 73 20 6f 6e 6c | 79 20 61 62 6f 75 74 20 |e is onl|y about |
|00004970| 31 30 25 20 73 6c 6f 77 | 65 72 20 74 68 61 6e 20 |10% slow|er than |
|00004980| 74 68 65 20 61 73 73 65 | 6d 62 6c 79 2c 20 61 6e |the asse|mbly, an|
|00004990| 64 0d 09 09 09 09 09 2f | 2f 20 69 73 20 6f 74 68 |d....../|/ is oth|
|000049a0| 65 72 77 69 73 65 20 65 | 71 75 69 76 61 6c 65 6e |erwise e|quivalen|
|000049b0| 74 2e 0d 09 09 09 09 09 | 2f 2f 20 41 73 20 6f 66 |t.......|// As of|
|000049c0| 20 31 31 2f 33 30 2f 39 | 32 20 74 68 69 73 20 6f | 11/30/9|2 this o|
|000049d0| 6e 6c 79 20 61 66 66 65 | 63 74 73 20 74 68 65 20 |nly affe|cts the |
|000049e0| 63 6f 64 65 20 66 6f 72 | 20 74 68 65 20 68 69 72 |code for| the hir|
|000049f0| 65 73 63 61 72 64 2e 0d | 23 70 72 61 67 6d 61 20 |escard..|#pragma |
|00004a00| 6f 70 74 69 6f 6e 73 28 | 61 73 73 69 67 6e 5f 72 |options(|assign_r|
|00004a10| 65 67 69 73 74 65 72 73 | 2c 68 6f 6e 6f 72 5f 72 |egisters|,honor_r|
|00004a20| 65 67 69 73 74 65 72 2c | 72 65 64 75 6e 64 61 6e |egister,|redundan|
|00004a30| 74 5f 6c 6f 61 64 73 2c | 64 65 66 65 72 5f 61 64 |t_loads,|defer_ad|
|00004a40| 6a 75 73 74 29 0d 23 70 | 72 61 67 6d 61 20 6f 70 |just).#p|ragma op|
|00004a50| 74 69 6f 6e 73 28 67 6c | 6f 62 61 6c 5f 6f 70 74 |tions(gl|obal_opt|
|00004a60| 69 6d 69 7a 65 72 2c 67 | 6f 70 74 5f 69 6e 64 75 |imizer,g|opt_indu|
|00004a70| 63 74 69 6f 6e 2c 67 6f | 70 74 5f 6c 6f 6f 70 2c |ction,go|pt_loop,|
|00004a80| 67 6f 70 74 5f 63 73 65 | 2c 67 6f 70 74 5f 63 6f |gopt_cse|,gopt_co|
|00004a90| 6c 6f 72 69 6e 67 29 0d | 23 70 72 61 67 6d 61 20 |loring).|#pragma |
|00004aa0| 6f 70 74 69 6f 6e 73 28 | 6d 63 36 38 30 32 30 29 |options(|mc68020)|
|00004ab0| 0d 0d 2f 2f 20 54 68 65 | 73 65 20 61 72 65 20 74 |..// The|se are t|
|00004ac0| 68 65 20 66 69 76 65 20 | 75 73 65 72 2d 63 61 6c |he five |user-cal|
|00004ad0| 6c 61 62 6c 65 20 72 6f | 75 74 69 6e 65 73 3a 0d |lable ro|utines:.|
|00004ae0| 4f 53 45 72 72 20 57 61 | 69 74 46 6f 72 4e 65 78 |OSErr Wa|itForNex|
|00004af0| 74 42 6c 61 6e 6b 69 6e | 67 28 47 44 48 61 6e 64 |tBlankin|g(GDHand|
|00004b00| 6c 65 20 64 65 76 69 63 | 65 29 3b 0d 4f 53 45 72 |le devic|e);.OSEr|
|00004b10| 72 20 53 65 74 45 6e 74 | 72 69 65 73 51 75 69 63 |r SetEnt|riesQuic|
|00004b20| 6b 6c 79 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |kly(GDHa|ndle dev|
|00004b30| 69 63 65 2c 73 68 6f 72 | 74 20 73 74 61 72 74 2c |ice,shor|t start,|
|00004b40| 73 68 6f 72 74 20 63 6f | 75 6e 74 2c 43 6f 6c 6f |short co|unt,Colo|
|00004b50| 72 53 70 65 63 20 2a 74 | 61 62 6c 65 29 3b 0d 73 |rSpec *t|able);.s|
|00004b60| 68 6f 72 74 20 6d 61 63 | 6c 74 73 65 74 28 47 44 |hort mac|ltset(GD|
|00004b70| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 73 68 |Handle d|evice,sh|
|00004b80| 6f 72 74 20 73 74 61 72 | 74 0d 09 2c 73 68 6f 72 |ort star|t..,shor|
|00004b90| 74 2a 20 72 65 64 2c 73 | 68 6f 72 74 2a 20 67 72 |t* red,s|hort* gr|
|00004ba0| 65 65 6e 2c 73 68 6f 72 | 74 2a 20 62 6c 75 65 2c |een,shor|t* blue,|
|00004bb0| 73 68 6f 72 74 20 63 6f | 75 6e 74 31 29 3b 0d 73 |short co|unt1);.s|
|00004bc0| 68 6f 72 74 20 47 65 74 | 43 61 72 64 54 79 70 65 |hort Get|CardType|
|00004bd0| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00004be0| 29 3b 0d 63 68 61 72 20 | 2a 47 65 74 43 61 72 64 |);.char |*GetCard|
|00004bf0| 42 61 73 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Base(GDH|andle de|
|00004c00| 76 69 63 65 29 3b 0d 0d | 2f 2a 0d 49 20 73 75 67 |vice);..|/*.I sug|
|00004c10| 67 65 73 74 20 6b 65 65 | 70 69 6e 67 20 74 68 65 |gest kee|ping the|
|00004c20| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 69 6e 66 6f 72 | followi|ng infor|
|00004c30| 6d 61 74 69 6f 6e 20 70 | 72 69 76 61 74 65 20 74 |mation p|rivate t|
|00004c40| 6f 20 74 68 69 73 20 66 | 69 6c 65 2e 20 49 6e 20 |o this f|ile. In |
|00004c50| 70 72 69 6e 63 69 70 6c | 65 0d 79 6f 75 20 63 6f |principl|e.you co|
|00004c60| 75 6c 64 20 70 75 62 6c | 69 73 68 20 74 68 65 73 |uld publ|ish thes|
|00004c70| 65 20 63 61 72 64 20 74 | 79 70 65 73 20 61 6e 64 |e card t|ypes and|
|00004c80| 20 75 73 65 20 74 68 65 | 6d 20 69 6e 20 79 6f 75 | use the|m in you|
|00004c90| 72 20 70 72 6f 67 72 61 | 6d 73 2e 20 48 6f 77 65 |r progra|ms. Howe|
|00004ca0| 76 65 72 2c 20 69 6e 0d | 70 72 61 63 74 69 63 65 |ver, in.|practice|
|00004cb0| 2c 20 49 20 63 61 6e 6e | 6f 74 20 73 65 65 20 61 |, I cann|ot see a|
|00004cc0| 6e 79 20 70 6f 69 6e 74 | 20 69 6e 20 64 6f 69 6e |ny point| in doin|
|00004cd0| 67 20 73 6f 2e 20 49 66 | 20 79 6f 75 20 6e 65 65 |g so. If| you nee|
|00004ce0| 64 20 74 6f 20 69 64 65 | 6e 74 69 66 79 20 74 68 |d to ide|ntify th|
|00004cf0| 65 20 63 61 72 64 0d 6e | 61 6d 65 20 49 20 73 75 |e card.n|ame I su|
|00004d00| 67 67 65 73 74 20 79 6f | 75 20 73 69 6d 70 6c 79 |ggest yo|u simply|
|00004d10| 20 75 73 65 20 74 68 65 | 20 73 74 72 69 6e 67 20 | use the| string |
|00004d20| 72 65 74 75 72 6e 65 64 | 20 62 79 20 47 44 43 61 |returned| by GDCa|
|00004d30| 72 64 4e 61 6d 65 28 64 | 65 76 69 63 65 29 20 69 |rdName(d|evice) i|
|00004d40| 6e 0d 47 44 56 69 64 65 | 6f 2e 63 20 6f 66 20 74 |n.GDVide|o.c of t|
|00004d50| 68 65 20 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |he Video|Toolbox.|
|00004d60| 20 28 44 6f 6e 27 74 20 | 66 6f 72 67 65 74 20 74 | (Don't |forget t|
|00004d70| 6f 20 63 61 6c 6c 20 44 | 69 73 70 6f 73 50 74 72 |o call D|isposPtr|
|00004d80| 28 29 20 77 68 65 6e 20 | 79 6f 75 27 72 65 0d 74 |() when |you're.t|
|00004d90| 68 72 6f 75 67 68 20 77 | 69 74 68 20 74 68 65 20 |hrough w|ith the |
|00004da0| 73 74 72 69 6e 67 2e 29 | 20 4f 72 20 75 73 65 20 |string.)| Or use |
|00004db0| 47 44 4e 61 6d 65 28 64 | 65 76 69 63 65 29 2c 20 |GDName(d|evice), |
|00004dc0| 77 68 69 63 68 20 72 65 | 74 75 72 6e 73 20 74 68 |which re|turns th|
|00004dd0| 65 20 6e 61 6d 65 20 6f | 66 20 74 68 65 0d 63 61 |e name o|f the.ca|
|00004de0| 72 64 27 73 20 64 72 69 | 76 65 72 2c 20 61 6e 64 |rd's dri|ver, and|
|00004df0| 20 69 73 20 6d 75 63 68 | 20 71 75 69 63 6b 65 72 | is much| quicker|
|00004e00| 2e 20 49 66 20 79 6f 75 | 20 73 69 6d 70 6c 79 20 |. If you| simply |
|00004e10| 77 61 6e 74 20 74 6f 20 | 6b 6e 6f 77 20 77 68 65 |want to |know whe|
|00004e20| 74 68 65 72 20 79 6f 75 | 72 0d 76 69 64 65 6f 20 |ther you|r.video |
|00004e30| 63 61 72 64 20 69 73 20 | 73 75 70 70 6f 72 74 65 |card is |supporte|
|00004e40| 64 20 62 79 20 53 65 74 | 45 6e 74 72 69 65 73 51 |d by Set|EntriesQ|
|00004e50| 75 69 63 6b 6c 79 2e 63 | 20 74 68 65 6e 20 79 6f |uickly.c| then yo|
|00004e60| 75 20 63 61 6e 20 73 69 | 6d 70 6c 79 20 6d 61 6b |u can si|mply mak|
|00004e70| 65 20 73 75 72 65 0d 74 | 68 61 74 20 47 65 74 43 |e sure.t|hat GetC|
|00004e80| 61 72 64 54 79 70 65 28 | 29 20 72 65 74 75 72 6e |ardType(|) return|
|00004e90| 73 20 61 20 6e 6f 6e 7a | 65 72 6f 20 74 79 70 65 |s a nonz|ero type|
|00004ea0| 2e 0d 2a 2f 0d 73 74 72 | 75 63 74 20 76 74 79 70 |..*/.str|uct vtyp|
|00004eb0| 65 20 7b 09 09 2f 2a 20 | 61 73 73 6f 63 69 61 74 |e {../* |associat|
|00004ec0| 65 73 20 63 61 72 64 20 | 6e 61 6d 65 20 61 6e 64 |es card |name and|
|00004ed0| 20 69 64 20 2a 2f 0d 09 | 63 68 61 72 20 6e 61 6d | id */..|char nam|
|00004ee0| 65 5b 34 30 5d 3b 0d 09 | 73 68 6f 72 74 20 69 64 |e[40];..|short id|
|00004ef0| 3b 0d 7d 3b 0d 65 6e 75 | 6d 20 7b 09 09 09 09 2f |;.};.enu|m {..../|
|00004f00| 2a 20 63 61 72 64 20 69 | 64 65 6e 74 69 66 69 65 |* card i|dentifie|
|00004f10| 72 73 20 2a 2f 0d 09 74 | 6f 62 79 63 61 72 64 20 |rs */..t|obycard |
|00004f20| 3d 20 31 2c 0d 09 68 69 | 72 65 73 63 61 72 64 2c |= 1,..hi|rescard,|
|00004f30| 0d 09 6d 61 63 49 49 63 | 69 2c 0d 09 6d 61 63 49 |..macIIc|i,..macI|
|00004f40| 49 73 69 2c 0d 09 78 38 | 32 34 63 61 72 64 2c 0d |Isi,..x8|24card,.|
|00004f50| 09 78 38 32 34 47 43 63 | 61 72 64 2c 0d 09 71 75 |.x824GCc|ard,..qu|
|00004f60| 61 64 72 61 37 30 30 2c | 0d 09 71 75 61 64 72 61 |adra700,|..quadra|
|00004f70| 39 30 30 2c 0d 09 71 75 | 61 64 72 61 39 35 30 2c |900,..qu|adra950,|
|00004f80| 0d 09 70 72 6f 63 6f 6c | 6f 72 33 32 0d 7d 3b 0d |..procol|or32.};.|
|00004f90| 73 74 61 74 69 63 20 73 | 74 72 75 63 74 20 76 74 |static s|truct vt|
|00004fa0| 79 70 65 20 63 61 72 64 | 5b 5d 20 3d 20 7b 09 2f |ype card|[] = {./|
|00004fb0| 2f 20 63 61 72 64 20 6e | 61 6d 65 20 26 20 69 64 |/ card n|ame & id|
|00004fc0| 09 09 2f 2f 20 4f 72 69 | 67 69 6e 61 6c 20 61 75 |..// Ori|ginal au|
|00004fd0| 74 68 6f 72 3a 0d 09 7b | 22 54 6f 62 79 20 66 72 |thor:..{|"Toby fr|
|00004fe0| 61 6d 65 20 62 75 66 66 | 65 72 20 63 61 72 64 22 |ame buff|er card"|
|00004ff0| 2c 09 09 09 09 74 6f 62 | 79 63 61 72 64 7d 2c 09 |,....tob|ycard},.|
|00005000| 2f 2f 20 52 61 79 6e 61 | 6c 64 20 43 6f 6d 74 6f |// Rayna|ld Comto|
|00005010| 69 73 0d 09 7b 22 44 69 | 73 70 6c 61 79 5f 56 69 |is..{"Di|splay_Vi|
|00005020| 64 65 6f 5f 41 70 70 6c | 65 5f 54 46 42 22 2c 09 |deo_Appl|e_TFB",.|
|00005030| 09 09 09 74 6f 62 79 63 | 61 72 64 7d 2c 09 2f 2f |...tobyc|ard},.//|
|00005040| 20 20 20 20 20 22 20 20 | 20 20 20 20 22 0d 09 7b | " | "..{|
|00005050| 22 4d 61 63 20 49 49 20 | 48 69 67 68 2d 52 65 73 |"Mac II |High-Res|
|00005060| 6f 6c 75 74 69 6f 6e 20 | 56 69 64 65 6f 20 43 61 |olution |Video Ca|
|00005070| 72 64 22 2c 09 68 69 72 | 65 73 63 61 72 64 7d 2c |rd",.hir|escard},|
|00005080| 09 2f 2f 20 52 61 79 6e | 61 6c 64 20 43 6f 6d 74 |.// Rayn|ald Comt|
|00005090| 6f 69 73 0d 09 7b 22 4d | 61 63 69 6e 74 6f 73 68 |ois..{"M|acintosh|
|000050a0| 20 49 49 20 42 75 69 6c | 74 2d 49 6e 20 56 69 64 | II Buil|t-In Vid|
|000050b0| 65 6f 22 2c 09 09 09 6d | 61 63 49 49 63 69 7d 2c |eo",...m|acIIci},|
|000050c0| 09 2f 2f 20 52 61 79 6e | 61 6c 64 20 43 6f 6d 74 |.// Rayn|ald Comt|
|000050d0| 6f 69 73 0d 09 7b 22 4d | 61 63 69 6e 74 6f 73 68 |ois..{"M|acintosh|
|000050e0| 20 41 20 42 75 69 6c 74 | 2d 49 6e 20 56 69 64 65 | A Built|-In Vide|
|000050f0| 6f 22 2c 09 09 09 6d 61 | 63 49 49 73 69 7d 2c 09 |o",...ma|cIIsi},.|
|00005100| 2f 2f 20 20 20 20 20 22 | 20 20 20 20 20 20 22 0d |// "| ".|
|00005110| 09 7b 22 4d 61 63 69 6e | 74 6f 73 68 20 44 69 73 |.{"Macin|tosh Dis|
|00005120| 70 6c 61 79 20 43 61 72 | 64 22 2c 09 09 09 09 78 |play Car|d",....x|
|00005130| 38 32 34 63 61 72 64 7d | 2c 09 2f 2f 20 52 61 79 |824card}|,.// Ray|
|00005140| 6e 61 6c 64 20 43 6f 6d | 74 6f 69 73 0d 09 7b 22 |nald Com|tois..{"|
|00005150| 4d 61 63 69 6e 74 6f 73 | 68 20 44 69 73 70 6c 61 |Macintos|h Displa|
|00005160| 79 20 43 61 72 64 20 38 | a5 32 34 20 47 43 22 2c |y Card 8|.24 GC",|
|00005170| 09 09 78 38 32 34 47 43 | 63 61 72 64 7d 2c 2f 2f |..x824GC|card},//|
|00005180| 20 52 61 79 6e 61 6c 64 | 20 43 6f 6d 74 6f 69 73 | Raynald| Comtois|
|00005190| 0d 09 7b 22 4d 61 63 69 | 6e 74 6f 73 68 20 45 20 |..{"Maci|ntosh E |
|000051a0| 42 75 69 6c 74 2d 49 6e | 20 56 69 64 65 6f 22 2c |Built-In| Video",|
|000051b0| 09 09 09 71 75 61 64 72 | 61 37 30 30 7d 2c 09 2f |...quadr|a700},./|
|000051c0| 2f 20 50 65 74 65 72 20 | 4c 65 6e 6e 69 65 0d 09 |/ Peter |Lennie..|
|000051d0| 7b 22 4d 61 63 69 6e 74 | 6f 73 68 20 43 20 42 75 |{"Macint|osh C Bu|
|000051e0| 69 6c 74 2d 49 6e 20 56 | 69 64 65 6f 22 2c 09 09 |ilt-In V|ideo",..|
|000051f0| 09 71 75 61 64 72 61 39 | 30 30 7d 2c 09 2f 2f 20 |.quadra9|00},.// |
|00005200| 20 20 20 20 22 20 20 20 | 20 20 20 22 0d 09 7b 22 | " | "..{"|
|00005210| 4d 61 63 69 6e 74 6f 73 | 68 20 47 20 42 75 69 6c |Macintos|h G Buil|
|00005220| 74 2d 49 6e 20 56 69 64 | 65 6f 22 2c 09 09 09 71 |t-In Vid|eo",...q|
|00005230| 75 61 64 72 61 39 35 30 | 7d 2c 09 2f 2f 20 20 20 |uadra950|},.// |
|00005240| 20 20 22 20 20 20 20 20 | 20 22 0d 09 7b 22 50 72 | " | "..{"Pr|
|00005250| 6f 43 6f 6c 6f 72 20 33 | 32 22 2c 09 09 09 09 09 |oColor 3|2",.....|
|00005260| 09 09 70 72 6f 63 6f 6c | 6f 72 33 32 7d 09 2f 2f |..procol|or32}.//|
|00005270| 20 42 69 6c 6c 20 48 61 | 61 6b 65 0d 7d 3b 0d 73 | Bill Ha|ake.};.s|
|00005280| 74 61 74 69 63 20 63 68 | 61 72 20 64 72 69 76 65 |tatic ch|ar drive|
|00005290| 72 4e 61 6d 65 5b 5d 5b | 34 30 5d 3d 09 09 2f 2f |rName[][|40]=..//|
|000052a0| 20 4e 6f 74 20 75 73 65 | 64 20 61 74 20 70 72 65 | Not use|d at pre|
|000052b0| 73 65 6e 74 2e 0d 7b 0d | 09 22 5c 70 2e 44 69 73 |sent..{.|."\p.Dis|
|000052c0| 70 6c 61 79 5f 56 69 64 | 65 6f 5f 41 70 70 6c 65 |play_Vid|eo_Apple|
|000052d0| 5f 54 46 42 22 09 2f 2f | 20 41 70 70 6c 65 20 d2 |_TFB".//| Apple .|
|000052e0| 54 6f 62 79 20 66 72 61 | 6d 65 20 62 75 66 66 65 |Toby fra|me buffe|
|000052f0| 72 20 63 61 72 64 d3 0d | 09 2c 22 5c 70 2e 44 69 |r card..|.,"\p.Di|
|00005300| 73 70 6c 61 79 5f 56 69 | 64 65 6f 5f 41 70 70 6c |splay_Vi|deo_Appl|
|00005310| 65 5f 48 52 56 43 22 09 | 2f 2f 20 41 70 70 6c 65 |e_HRVC".|// Apple|
|00005320| 20 d2 4d 61 63 20 49 49 | 20 48 69 67 68 2d 52 65 | .Mac II| High-Re|
|00005330| 73 6f 6c 75 74 69 6f 6e | 20 56 69 64 65 6f 20 43 |solution| Video C|
|00005340| 61 72 64 d3 0d 09 2c 22 | 5c 70 2e 44 69 73 70 6c |ard...,"|\p.Displ|
|00005350| 61 79 5f 56 69 64 65 6f | 5f 41 70 70 6c 65 5f 4d |ay_Video|_Apple_M|
|00005360| 44 43 22 09 2f 2f 20 41 | 70 70 6c 65 20 38 a5 32 |DC".// A|pple 8.2|
|00005370| 34 20 d2 4d 61 63 69 6e | 74 6f 73 68 20 44 69 73 |4 .Macin|tosh Dis|
|00005380| 70 6c 61 79 20 43 61 72 | 64 d3 0d 09 2c 22 5c 70 |play Car|d...,"\p|
|00005390| 2e 3f 3f 3f 22 09 09 09 | 09 09 09 2f 2f 20 41 70 |.???"...|...// Ap|
|000053a0| 70 6c 65 20 38 a5 32 34 | 47 43 0d 09 2c 22 5c 70 |ple 8.24|GC..,"\p|
|000053b0| 2e 44 69 73 70 6c 61 79 | 5f 56 69 64 65 6f 5f 41 |.Display|_Video_A|
|000053c0| 70 70 6c 65 5f 52 42 56 | 31 22 09 2f 2f 20 4d 61 |pple_RBV|1".// Ma|
|000053d0| 63 20 49 49 63 69 20 61 | 6e 64 20 49 49 73 69 20 |c IIci a|nd IIsi |
|000053e0| 62 75 69 6c 74 2d 69 6e | 20 76 69 64 65 6f 0d 09 |built-in| video..|
|000053f0| 2c 22 5c 70 2e 44 69 73 | 70 6c 61 79 5f 56 69 64 |,"\p.Dis|play_Vid|
|00005400| 65 6f 5f 41 70 70 6c 65 | 5f 44 41 46 42 22 09 2f |eo_Apple|_DAFB"./|
|00005410| 2f 20 51 75 61 64 72 61 | 20 37 30 30 2c 20 39 30 |/ Quadra| 700, 90|
|00005420| 30 2c 20 39 35 30 20 62 | 75 69 6c 74 2d 69 6e 20 |0, 950 b|uilt-in |
|00005430| 76 69 64 65 6f 0d 09 2c | 22 5c 70 2e 3f 3f 3f 22 |video..,|"\p.???"|
|00005440| 09 09 09 09 09 09 2f 2f | 20 52 61 64 69 75 73 20 |......//| Radius |
|00005450| 50 72 6f 43 6f 6c 6f 72 | 20 33 32 0d 7d 3b 0d 65 |ProColor| 32.};.e|
|00005460| 6e 75 6d 20 7b 09 09 09 | 09 09 09 2f 2f 20 46 6c |num {...|...// Fl|
|00005470| 61 67 73 20 70 61 73 73 | 65 64 20 74 6f 20 4c 6f |ags pass|ed to Lo|
|00005480| 61 64 43 6c 75 74 28 29 | 2e 0d 09 73 75 73 70 65 |adClut()|...suspe|
|00005490| 6e 64 49 6e 74 65 72 72 | 75 70 74 73 3d 31 2c 0d |ndInterr|upts=1,.|
|000054a0| 09 75 73 65 4d 6f 73 74 | 53 69 67 6e 69 66 69 63 |.useMost|Signific|
|000054b0| 61 6e 74 42 69 74 73 3d | 32 2c 0d 09 75 73 65 4f |antBits=|2,..useO|
|000054c0| 6e 6c 79 38 42 69 74 73 | 3d 34 2c 0d 09 77 61 69 |nly8Bits|=4,..wai|
|000054d0| 74 46 6f 72 4e 65 78 74 | 42 6c 61 6e 6b 69 6e 67 |tForNext|Blanking|
|000054e0| 3d 38 0d 7d 3b 0d 65 6e | 75 6d 7b 71 75 61 64 72 |=8.};.en|um{quadr|
|000054f0| 61 4e 6f 6e 7a 65 72 6f | 53 74 61 72 74 3d 31 31 |aNonzero|Start=11|
|00005500| 31 7d 3b 09 2f 2f 20 76 | 61 6c 75 65 20 72 65 74 |1};.// v|alue ret|
|00005510| 75 72 6e 65 64 20 61 73 | 20 65 72 72 6f 72 2e 0d |urned as| error..|
|00005520| 09 0d 73 68 6f 72 74 20 | 4c 6f 61 64 43 6c 75 74 |..short |LoadClut|
|00005530| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00005540| 2c 73 68 6f 72 74 20 73 | 74 61 72 74 2c 73 68 6f |,short s|tart,sho|
|00005550| 72 74 20 63 6f 75 6e 74 | 0d 09 2c 73 68 6f 72 74 |rt count|..,short|
|00005560| 2a 20 72 65 64 2c 73 68 | 6f 72 74 2a 20 67 72 65 |* red,sh|ort* gre|
|00005570| 65 6e 2c 73 68 6f 72 74 | 2a 20 62 6c 75 65 2c 6c |en,short|* blue,l|
|00005580| 6f 6e 67 20 65 6c 65 6d | 65 6e 74 53 70 61 63 69 |ong elem|entSpaci|
|00005590| 6e 67 2c 73 68 6f 72 74 | 20 66 6c 61 67 73 29 3b |ng,short| flags);|
|000055a0| 0d 4f 53 45 72 72 20 4c | 6f 61 64 43 6c 75 74 50 |.OSErr L|oadClutP|
|000055b0| 72 6f 43 6f 6c 6f 72 28 | 73 68 6f 72 74 20 73 74 |roColor(|short st|
|000055c0| 61 72 74 2c 73 68 6f 72 | 74 20 63 6f 75 6e 74 2c |art,shor|t count,|
|000055d0| 63 68 61 72 20 2a 72 2c | 63 68 61 72 20 2a 67 2c |char *r,|char *g,|
|000055e0| 63 68 61 72 20 2a 62 0d | 09 2c 6c 6f 6e 67 20 65 |char *b.|.,long e|
|000055f0| 6c 65 6d 65 6e 74 53 70 | 61 63 69 6e 67 2c 73 68 |lementSp|acing,sh|
|00005600| 6f 72 74 20 6d 6f 64 65 | 2c 73 68 6f 72 74 20 70 |ort mode|,short p|
|00005610| 69 78 65 6c 53 69 7a 65 | 2c 73 68 6f 72 74 20 63 |ixelSize|,short c|
|00005620| 74 53 69 7a 65 0d 09 2c | 63 68 61 72 20 2a 63 61 |tSize..,|char *ca|
|00005630| 72 64 42 61 73 65 2c 73 | 68 6f 72 74 20 66 6c 61 |rdBase,s|hort fla|
|00005640| 67 73 29 3b 0d 4f 53 45 | 72 72 20 4c 6f 61 64 43 |gs);.OSE|rr LoadC|
|00005650| 6c 75 74 51 75 61 64 72 | 61 28 73 68 6f 72 74 20 |lutQuadr|a(short |
|00005660| 73 74 61 72 74 2c 73 68 | 6f 72 74 20 63 6f 75 6e |start,sh|ort coun|
|00005670| 74 2c 63 68 61 72 20 2a | 72 2c 63 68 61 72 20 2a |t,char *|r,char *|
|00005680| 67 2c 63 68 61 72 20 2a | 62 0d 09 2c 6c 6f 6e 67 |g,char *|b..,long|
|00005690| 20 65 6c 65 6d 65 6e 74 | 53 70 61 63 69 6e 67 2c | element|Spacing,|
|000056a0| 73 68 6f 72 74 20 6d 6f | 64 65 2c 73 68 6f 72 74 |short mo|de,short|
|000056b0| 20 70 69 78 65 6c 53 69 | 7a 65 2c 73 68 6f 72 74 | pixelSi|ze,short|
|000056c0| 20 63 74 53 69 7a 65 0d | 09 2c 63 68 61 72 20 2a | ctSize.|.,char *|
|000056d0| 63 61 72 64 42 61 73 65 | 2c 73 68 6f 72 74 20 66 |cardBase|,short f|
|000056e0| 6c 61 67 73 29 3b 0d 4f | 53 45 72 72 20 4c 6f 61 |lags);.O|SErr Loa|
|000056f0| 64 43 6c 75 74 4d 61 63 | 49 49 63 69 28 73 68 6f |dClutMac|IIci(sho|
|00005700| 72 74 20 73 74 61 72 74 | 2c 73 68 6f 72 74 20 63 |rt start|,short c|
|00005710| 6f 75 6e 74 2c 63 68 61 | 72 20 2a 72 2c 63 68 61 |ount,cha|r *r,cha|
|00005720| 72 20 2a 67 2c 63 68 61 | 72 20 2a 62 0d 09 2c 6c |r *g,cha|r *b..,l|
|00005730| 6f 6e 67 20 65 6c 65 6d | 65 6e 74 53 70 61 63 69 |ong elem|entSpaci|
|00005740| 6e 67 2c 73 68 6f 72 74 | 20 6d 6f 64 65 2c 73 68 |ng,short| mode,sh|
|00005750| 6f 72 74 20 70 69 78 65 | 6c 53 69 7a 65 2c 73 68 |ort pixe|lSize,sh|
|00005760| 6f 72 74 20 63 74 53 69 | 7a 65 0d 09 2c 63 68 61 |ort ctSi|ze..,cha|
|00005770| 72 20 2a 63 61 72 64 42 | 61 73 65 2c 73 68 6f 72 |r *cardB|ase,shor|
|00005780| 74 20 66 6c 61 67 73 29 | 3b 0d 4f 53 45 72 72 20 |t flags)|;.OSErr |
|00005790| 4c 6f 61 64 43 6c 75 74 | 48 69 52 65 73 28 73 68 |LoadClut|HiRes(sh|
|000057a0| 6f 72 74 20 73 74 61 72 | 74 2c 73 68 6f 72 74 20 |ort star|t,short |
|000057b0| 63 6f 75 6e 74 2c 63 68 | 61 72 20 2a 72 2c 63 68 |count,ch|ar *r,ch|
|000057c0| 61 72 20 2a 67 2c 63 68 | 61 72 20 2a 62 0d 09 2c |ar *g,ch|ar *b..,|
|000057d0| 6c 6f 6e 67 20 65 6c 65 | 6d 65 6e 74 53 70 61 63 |long ele|mentSpac|
|000057e0| 69 6e 67 2c 73 68 6f 72 | 74 20 6d 6f 64 65 2c 73 |ing,shor|t mode,s|
|000057f0| 68 6f 72 74 20 70 69 78 | 65 6c 53 69 7a 65 2c 73 |hort pix|elSize,s|
|00005800| 68 6f 72 74 20 63 74 53 | 69 7a 65 0d 09 2c 63 68 |hort ctS|ize..,ch|
|00005810| 61 72 20 2a 63 61 72 64 | 42 61 73 65 2c 73 68 6f |ar *card|Base,sho|
|00005820| 72 74 20 66 6c 61 67 73 | 29 3b 0d 4f 53 45 72 72 |rt flags|);.OSErr|
|00005830| 20 4c 6f 61 64 43 6c 75 | 74 78 38 32 34 28 73 68 | LoadClu|tx824(sh|
|00005840| 6f 72 74 20 73 74 61 72 | 74 2c 73 68 6f 72 74 20 |ort star|t,short |
|00005850| 63 6f 75 6e 74 2c 63 68 | 61 72 20 2a 72 2c 63 68 |count,ch|ar *r,ch|
|00005860| 61 72 20 2a 67 2c 63 68 | 61 72 20 2a 62 0d 09 2c |ar *g,ch|ar *b..,|
|00005870| 6c 6f 6e 67 20 65 6c 65 | 6d 65 6e 74 53 70 61 63 |long ele|mentSpac|
|00005880| 69 6e 67 2c 73 68 6f 72 | 74 20 6d 6f 64 65 2c 73 |ing,shor|t mode,s|
|00005890| 68 6f 72 74 20 70 69 78 | 65 6c 53 69 7a 65 2c 73 |hort pix|elSize,s|
|000058a0| 68 6f 72 74 20 63 74 53 | 69 7a 65 0d 09 2c 63 68 |hort ctS|ize..,ch|
|000058b0| 61 72 20 2a 63 61 72 64 | 42 61 73 65 2c 73 68 6f |ar *card|Base,sho|
|000058c0| 72 74 20 66 6c 61 67 73 | 29 3b 0d 4f 53 45 72 72 |rt flags|);.OSErr|
|000058d0| 20 4c 6f 61 64 43 6c 75 | 74 78 38 32 34 47 43 28 | LoadClu|tx824GC(|
|000058e0| 73 68 6f 72 74 20 73 74 | 61 72 74 2c 73 68 6f 72 |short st|art,shor|
|000058f0| 74 20 63 6f 75 6e 74 2c | 63 68 61 72 20 2a 72 2c |t count,|char *r,|
|00005900| 63 68 61 72 20 2a 67 2c | 63 68 61 72 20 2a 62 0d |char *g,|char *b.|
|00005910| 09 2c 6c 6f 6e 67 20 65 | 6c 65 6d 65 6e 74 53 70 |.,long e|lementSp|
|00005920| 61 63 69 6e 67 2c 73 68 | 6f 72 74 20 6d 6f 64 65 |acing,sh|ort mode|
|00005930| 2c 73 68 6f 72 74 20 70 | 69 78 65 6c 53 69 7a 65 |,short p|ixelSize|
|00005940| 2c 73 68 6f 72 74 20 63 | 74 53 69 7a 65 0d 09 2c |,short c|tSize..,|
|00005950| 63 68 61 72 20 2a 63 61 | 72 64 42 61 73 65 2c 73 |char *ca|rdBase,s|
|00005960| 68 6f 72 74 20 66 6c 61 | 67 73 29 3b 0d 4f 53 45 |hort fla|gs);.OSE|
|00005970| 72 72 20 4c 6f 61 64 43 | 6c 75 74 54 6f 62 79 28 |rr LoadC|lutToby(|
|00005980| 73 68 6f 72 74 20 73 74 | 61 72 74 2c 73 68 6f 72 |short st|art,shor|
|00005990| 74 20 63 6f 75 6e 74 2c | 63 68 61 72 20 2a 72 2c |t count,|char *r,|
|000059a0| 63 68 61 72 20 2a 67 2c | 63 68 61 72 20 2a 62 0d |char *g,|char *b.|
|000059b0| 09 2c 6c 6f 6e 67 20 65 | 6c 65 6d 65 6e 74 53 70 |.,long e|lementSp|
|000059c0| 61 63 69 6e 67 2c 73 68 | 6f 72 74 20 6d 6f 64 65 |acing,sh|ort mode|
|000059d0| 2c 73 68 6f 72 74 20 70 | 69 78 65 6c 53 69 7a 65 |,short p|ixelSize|
|000059e0| 2c 73 68 6f 72 74 20 63 | 74 53 69 7a 65 0d 09 2c |,short c|tSize..,|
|000059f0| 63 68 61 72 20 2a 63 61 | 72 64 42 61 73 65 2c 73 |char *ca|rdBase,s|
|00005a00| 68 6f 72 74 20 66 6c 61 | 67 73 29 3b 0d 2f 2a 2a |hort fla|gs);./**|
|00005a10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005a20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005a30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005a40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005a50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0d 2f 2a |********|****/./*|
|00005a60| 0d 54 68 65 20 61 72 67 | 75 6d 65 6e 74 73 20 73 |.The arg|uments s|
|00005a70| 74 61 72 74 2c 20 63 6f | 75 6e 74 2c 20 61 6e 64 |tart, co|unt, and|
|00005a80| 20 74 61 62 6c 65 20 61 | 72 65 20 74 68 65 20 73 | table a|re the s|
|00005a90| 61 6d 65 20 61 73 20 66 | 6f 72 20 74 68 65 20 43 |ame as f|or the C|
|00005aa0| 6f 6c 6f 72 20 4d 61 6e | 61 67 65 72 20 63 61 6c |olor Man|ager cal|
|00005ab0| 6c 0d 53 65 74 45 6e 74 | 72 69 65 73 28 29 2c 20 |l.SetEnt|ries(), |
|00005ac0| 64 6f 63 75 6d 65 6e 74 | 65 64 20 69 6e 20 49 6e |document|ed in In|
|00005ad0| 73 69 64 65 20 4d 61 63 | 69 6e 74 6f 73 68 20 56 |side Mac|intosh V|
|00005ae0| 2d 31 34 33 2e 20 28 45 | 78 63 65 70 74 20 74 68 |-143. (E|xcept th|
|00005af0| 61 74 20 61 20 63 6f 75 | 6e 74 3d 3d 2d 31 20 69 |at a cou|nt==-1 i|
|00005b00| 73 0d 63 6f 6e 73 69 64 | 65 72 65 64 20 69 6c 6c |s.consid|ered ill|
|00005b10| 65 67 61 6c 20 68 65 72 | 65 2e 29 20 41 70 70 6c |egal her|e.) Appl|
|00005b20| 65 27 73 20 69 64 65 6f | 73 79 6e 63 72 61 74 69 |e's ideo|syncrati|
|00005b30| 63 20 63 6f 6e 76 65 6e | 74 69 6f 6e 20 69 73 20 |c conven|tion is |
|00005b40| 74 68 61 74 20 22 63 6f | 75 6e 74 22 20 69 73 0d |that "co|unt" is.|
|00005b50| 22 7a 65 72 6f 2d 62 61 | 73 65 64 22 2c 20 6d 65 |"zero-ba|sed", me|
|00005b60| 61 6e 69 6e 67 20 74 68 | 61 74 20 69 74 20 69 73 |aning th|at it is|
|00005b70| 20 6f 6e 65 20 6c 65 73 | 73 20 74 68 61 6e 20 74 | one les|s than t|
|00005b80| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 6c 75 |he numbe|r of clu|
|00005b90| 74 20 65 6e 74 72 69 65 | 73 20 74 68 61 74 0d 79 |t entrie|s that.y|
|00005ba0| 6f 75 20 77 61 6e 74 20 | 74 6f 20 6d 6f 64 69 66 |ou want |to modif|
|00005bb0| 79 2e 20 22 63 6f 75 6e | 74 22 20 6d 75 73 74 20 |y. "coun|t" must |
|00005bc0| 62 65 20 61 74 20 6c 65 | 61 73 74 20 7a 65 72 6f |be at le|ast zero|
|00005bd0| 2e 20 52 65 74 75 72 6e | 73 20 7a 65 72 6f 20 69 |. Return|s zero i|
|00005be0| 66 20 73 75 63 63 65 73 | 73 66 75 6c 2c 0d 6e 6f |f succes|sful,.no|
|00005bf0| 6e 7a 65 72 6f 20 69 66 | 20 75 6e 73 75 63 63 65 |nzero if| unsucce|
|00005c00| 73 73 66 75 6c 2c 20 69 | 2e 65 2e 20 69 6c 6c 65 |ssful, i|.e. ille|
|00005c10| 67 61 6c 20 61 72 67 75 | 6d 65 6e 74 73 2e 0d 2a |gal argu|ments..*|
|00005c20| 2f 0d 4f 53 45 72 72 20 | 53 65 74 45 6e 74 72 69 |/.OSErr |SetEntri|
|00005c30| 65 73 51 75 69 63 6b 6c | 79 28 47 44 48 61 6e 64 |esQuickl|y(GDHand|
|00005c40| 6c 65 20 64 65 76 69 63 | 65 2c 73 68 6f 72 74 20 |le devic|e,short |
|00005c50| 73 74 61 72 74 2c 73 68 | 6f 72 74 20 63 6f 75 6e |start,sh|ort coun|
|00005c60| 74 2c 43 6f 6c 6f 72 53 | 70 65 63 20 2a 74 61 62 |t,ColorS|pec *tab|
|00005c70| 6c 65 29 0d 7b 0d 09 73 | 68 6f 72 74 20 66 6c 61 |le).{..s|hort fla|
|00005c80| 67 73 3d 75 73 65 4d 6f | 73 74 53 69 67 6e 69 66 |gs=useMo|stSignif|
|00005c90| 69 63 61 6e 74 42 69 74 | 73 3b 0d 09 2f 2f 66 6c |icantBit|s;..//fl|
|00005ca0| 61 67 73 2b 3d 73 75 73 | 70 65 6e 64 49 6e 74 65 |ags+=sus|pendInte|
|00005cb0| 72 72 75 70 74 73 3b 09 | 09 2f 2f 20 4f 70 74 69 |rrupts;.|.// Opti|
|00005cc0| 6f 6e 61 6c 2c 20 6e 6f | 0d 09 2f 2f 66 6c 61 67 |onal, no|..//flag|
|00005cd0| 73 2b 3d 77 61 69 74 46 | 6f 72 4e 65 78 74 42 6c |s+=waitF|orNextBl|
|00005ce0| 61 6e 6b 69 6e 67 3b 09 | 2f 2f 20 4f 70 74 69 6f |anking;.|// Optio|
|00005cf0| 6e 61 6c 2c 20 6e 6f 0d | 0d 09 72 65 74 75 72 6e |nal, no.|..return|
|00005d00| 20 4c 6f 61 64 43 6c 75 | 74 28 64 65 76 69 63 65 | LoadClu|t(device|
|00005d10| 2c 73 74 61 72 74 2c 63 | 6f 75 6e 74 0d 09 09 2c |,start,c|ount...,|
|00005d20| 28 73 68 6f 72 74 20 2a | 29 26 74 61 62 6c 65 5b |(short *|)&table[|
|00005d30| 30 5d 2e 72 67 62 2e 72 | 65 64 2c 28 73 68 6f 72 |0].rgb.r|ed,(shor|
|00005d40| 74 20 2a 29 26 74 61 62 | 6c 65 5b 30 5d 2e 72 67 |t *)&tab|le[0].rg|
|00005d50| 62 2e 67 72 65 65 6e 0d | 09 09 2c 28 73 68 6f 72 |b.green.|..,(shor|
|00005d60| 74 20 2a 29 26 74 61 62 | 6c 65 5b 30 5d 2e 72 67 |t *)&tab|le[0].rg|
|00005d70| 62 2e 62 6c 75 65 2c 73 | 69 7a 65 6f 66 28 74 61 |b.blue,s|izeof(ta|
|00005d80| 62 6c 65 5b 30 5d 29 2c | 66 6c 61 67 73 29 3b 0d |ble[0]),|flags);.|
|00005d90| 7d 0d 2f 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |}./*****|********|
|00005da0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005db0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005dc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005dd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005de0| 2a 2f 0d 73 68 6f 72 74 | 20 6d 61 63 6c 74 73 65 |*/.short| macltse|
|00005df0| 74 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |t(GDHand|le devic|
|00005e00| 65 2c 72 65 67 69 73 74 | 65 72 20 73 68 6f 72 74 |e,regist|er short|
|00005e10| 20 73 74 61 72 74 0d 09 | 2c 73 68 6f 72 74 2a 20 | start..|,short* |
|00005e20| 72 65 64 2c 73 68 6f 72 | 74 2a 20 67 72 65 65 6e |red,shor|t* green|
|00005e30| 2c 73 68 6f 72 74 2a 20 | 62 6c 75 65 2c 73 68 6f |,short* |blue,sho|
|00005e40| 72 74 20 63 6f 75 6e 74 | 31 29 0d 7b 0d 09 73 68 |rt count|1).{..sh|
|00005e50| 6f 72 74 20 66 6c 61 67 | 73 3d 30 3b 0d 09 66 6c |ort flag|s=0;..fl|
|00005e60| 61 67 73 2b 3d 73 75 73 | 70 65 6e 64 49 6e 74 65 |ags+=sus|pendInte|
|00005e70| 72 72 75 70 74 73 3b 09 | 09 2f 2f 20 4f 70 74 69 |rrupts;.|.// Opti|
|00005e80| 6f 6e 61 6c 2c 20 79 65 | 73 0d 09 23 69 66 20 55 |onal, ye|s..#if U|
|00005e90| 53 45 5f 4f 4e 4c 59 5f | 38 5f 42 49 54 53 5f 49 |SE_ONLY_|8_BITS_I|
|00005ea0| 4e 5f 4d 41 43 4c 54 53 | 45 54 0d 09 09 66 6c 61 |N_MACLTS|ET...fla|
|00005eb0| 67 73 2b 3d 75 73 65 4f | 6e 6c 79 38 42 69 74 73 |gs+=useO|nly8Bits|
|00005ec0| 3b 09 09 2f 2f 20 4f 70 | 74 69 6f 6e 61 6c 0d 09 |;..// Op|tional..|
|00005ed0| 23 65 6e 64 69 66 0d 09 | 2f 2f 66 6c 61 67 73 2b |#endif..|//flags+|
|00005ee0| 3d 77 61 69 74 46 6f 72 | 4e 65 78 74 42 6c 61 6e |=waitFor|NextBlan|
|00005ef0| 6b 69 6e 67 3b 09 2f 2f | 20 4f 70 74 69 6f 6e 61 |king;.//| Optiona|
|00005f00| 6c 2c 20 6e 6f 0d 09 0d | 09 72 65 74 75 72 6e 20 |l, no...|.return |
|00005f10| 4c 6f 61 64 43 6c 75 74 | 28 64 65 76 69 63 65 2c |LoadClut|(device,|
|00005f20| 73 74 61 72 74 2c 63 6f | 75 6e 74 31 2d 31 2c 72 |start,co|unt1-1,r|
|00005f30| 65 64 2c 67 72 65 65 6e | 2c 62 6c 75 65 2c 73 69 |ed,green|,blue,si|
|00005f40| 7a 65 6f 66 28 72 65 64 | 5b 30 5d 29 2c 66 6c 61 |zeof(red|[0]),fla|
|00005f50| 67 73 29 3b 0d 7d 0d 2f | 2a 2a 2a 2a 2a 2a 2a 2a |gs);.}./|********|
|00005f60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00005fa0| 2a 2a 2a 2a 2a 2a 2f 0d | 2f 2a 0d 54 68 65 20 66 |******/.|/*.The f|
|00005fb0| 69 72 73 74 20 63 61 6c | 6c 20 74 6f 20 47 65 74 |irst cal|l to Get|
|00005fc0| 43 61 72 64 54 79 70 65 | 20 66 6f 72 20 61 20 70 |CardType| for a p|
|00005fd0| 61 72 74 69 63 75 6c 61 | 72 20 64 65 76 69 63 65 |articula|r device|
|00005fe0| 20 74 61 6b 65 73 20 31 | 2e 35 2d 33 20 6d 73 2c | takes 1|.5-3 ms,|
|00005ff0| 20 64 65 70 65 6e 64 69 | 6e 67 0d 6f 6e 20 79 6f | dependi|ng.on yo|
|00006000| 75 72 20 63 6f 6d 70 75 | 74 65 72 27 73 20 73 70 |ur compu|ter's sp|
|00006010| 65 65 64 2c 20 62 65 63 | 61 75 73 65 20 69 74 20 |eed, bec|ause it |
|00006020| 74 61 6b 65 73 20 41 70 | 70 6c 65 27 73 20 53 6c |takes Ap|ple's Sl|
|00006030| 6f 74 20 4d 61 6e 61 67 | 65 72 20 61 20 6c 6f 6e |ot Manag|er a lon|
|00006040| 67 20 74 69 6d 65 20 74 | 6f 0d 67 65 74 20 74 68 |g time t|o.get th|
|00006050| 65 20 63 61 72 64 20 6e | 61 6d 65 2e 20 48 6f 77 |e card n|ame. How|
|00006060| 65 76 65 72 2c 20 47 65 | 74 43 61 72 64 54 79 70 |ever, Ge|tCardTyp|
|00006070| 65 27 73 20 61 6e 73 77 | 65 72 73 20 61 72 65 20 |e's answ|ers are |
|00006080| 63 61 63 68 65 64 20 73 | 6f 20 73 75 62 73 65 71 |cached s|o subseq|
|00006090| 75 65 6e 74 20 63 61 6c | 6c 73 0d 66 6f 72 20 61 |uent cal|ls.for a|
|000060a0| 20 70 72 65 76 69 6f 75 | 73 6c 79 20 71 75 65 72 | previou|sly quer|
|000060b0| 69 65 64 20 64 65 76 69 | 63 65 20 77 69 6c 6c 20 |ied devi|ce will |
|000060c0| 62 65 20 66 61 73 74 20 | 3c 31 30 30 20 b5 73 2e |be fast |<100 .s.|
|000060d0| 0d 2a 2f 0d 73 68 6f 72 | 74 20 47 65 74 43 61 72 |.*/.shor|t GetCar|
|000060e0| 64 54 79 70 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |dType(GD|Handle d|
|000060f0| 65 76 69 63 65 29 09 2f | 2f 20 72 65 74 75 72 6e |evice)./|/ return|
|00006100| 73 20 63 61 72 64 20 74 | 79 70 65 2c 20 69 66 20 |s card t|ype, if |
|00006110| 6b 6e 6f 77 6e 2c 20 6f | 72 20 7a 65 72 6f 20 69 |known, o|r zero i|
|00006120| 66 20 6e 6f 74 2e 0d 7b | 0d 09 72 65 67 69 73 74 |f not..{|..regist|
|00006130| 65 72 20 73 68 6f 72 74 | 20 69 3b 0d 09 73 68 6f |er short| i;..sho|
|00006140| 72 74 20 74 79 70 65 3b | 0d 09 63 68 61 72 20 2a |rt type;|..char *|
|00006150| 6e 61 6d 65 3b 0d 09 73 | 74 61 74 69 63 20 47 44 |name;..s|tatic GD|
|00006160| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 43 61 63 |Handle d|eviceCac|
|00006170| 68 65 5b 4d 41 58 5f 53 | 43 52 45 45 4e 53 5d 3b |he[MAX_S|CREENS];|
|00006180| 0d 09 73 74 61 74 69 63 | 20 73 68 6f 72 74 20 74 |..static| short t|
|00006190| 79 70 65 43 61 63 68 65 | 5b 4d 41 58 5f 53 43 52 |ypeCache|[MAX_SCR|
|000061a0| 45 45 4e 53 5d 3b 0d 09 | 0d 09 2f 2f 20 44 6f 20 |EENS];..|..// Do |
|000061b0| 77 65 20 61 6c 72 65 61 | 64 79 20 6b 6e 6f 77 20 |we alrea|dy know |
|000061c0| 74 68 65 20 61 6e 73 77 | 65 72 3f 20 43 68 65 63 |the answ|er? Chec|
|000061d0| 6b 20 74 68 65 20 63 61 | 63 68 65 2e 0d 09 66 6f |k the ca|che...fo|
|000061e0| 72 28 69 3d 30 3b 69 3c | 4d 41 58 5f 53 43 52 45 |r(i=0;i<|MAX_SCRE|
|000061f0| 45 4e 53 3b 69 2b 2b 29 | 0d 09 09 69 66 28 64 65 |ENS;i++)|...if(de|
|00006200| 76 69 63 65 3d 3d 64 65 | 76 69 63 65 43 61 63 68 |vice==de|viceCach|
|00006210| 65 5b 69 5d 29 72 65 74 | 75 72 6e 20 74 79 70 65 |e[i])ret|urn type|
|00006220| 43 61 63 68 65 5b 69 5d | 3b 0d 09 2f 2f 20 47 65 |Cache[i]|;..// Ge|
|00006230| 74 20 63 61 72 64 20 6e | 61 6d 65 2c 20 73 65 65 |t card n|ame, see|
|00006240| 20 69 66 20 69 74 27 73 | 20 69 6e 20 6f 75 72 20 | if it's| in our |
|00006250| 6c 69 73 74 20 6f 66 20 | 6b 6e 6f 77 6e 20 63 61 |list of |known ca|
|00006260| 72 64 73 0d 09 6e 61 6d | 65 3d 47 44 43 61 72 64 |rds..nam|e=GDCard|
|00006270| 4e 61 6d 65 28 64 65 76 | 69 63 65 29 3b 0d 09 74 |Name(dev|ice);..t|
|00006280| 79 70 65 3d 30 3b 0d 09 | 66 6f 72 20 28 69 3d 30 |ype=0;..|for (i=0|
|00006290| 3b 20 69 3c 73 69 7a 65 | 6f 66 28 63 61 72 64 29 |; i<size|of(card)|
|000062a0| 2f 73 69 7a 65 6f 66 28 | 63 61 72 64 5b 30 5d 29 |/sizeof(|card[0])|
|000062b0| 3b 20 69 2b 2b 29 7b 0d | 09 09 69 66 28 73 74 72 |; i++){.|..if(str|
|000062c0| 63 6d 70 28 6e 61 6d 65 | 2c 63 61 72 64 5b 69 5d |cmp(name|,card[i]|
|000062d0| 2e 6e 61 6d 65 29 3d 3d | 30 29 7b 0d 09 09 09 74 |.name)==|0){....t|
|000062e0| 79 70 65 3d 63 61 72 64 | 5b 69 5d 2e 69 64 3b 0d |ype=card|[i].id;.|
|000062f0| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 7d 0d 09 7d |...break|;...}..}|
|00006300| 0d 09 44 69 73 70 6f 73 | 65 50 74 72 28 6e 61 6d |..Dispos|ePtr(nam|
|00006310| 65 29 3b 0d 09 2f 2f 20 | 53 61 76 65 20 61 6e 73 |e);..// |Save ans|
|00006320| 77 65 72 20 69 6e 20 63 | 61 63 68 65 2e 0d 09 66 |wer in c|ache...f|
|00006330| 6f 72 28 69 3d 30 3b 69 | 3c 4d 41 58 5f 53 43 52 |or(i=0;i|<MAX_SCR|
|00006340| 45 45 4e 53 3b 69 2b 2b | 29 7b 0d 09 09 69 66 28 |EENS;i++|){...if(|
|00006350| 64 65 76 69 63 65 43 61 | 63 68 65 5b 69 5d 3d 3d |deviceCa|che[i]==|
|00006360| 30 29 7b 0d 09 09 09 74 | 79 70 65 43 61 63 68 65 |0){....t|ypeCache|
|00006370| 5b 69 5d 3d 74 79 70 65 | 3b 0d 09 09 09 64 65 76 |[i]=type|;....dev|
|00006380| 69 63 65 43 61 63 68 65 | 5b 69 5d 3d 64 65 76 69 |iceCache|[i]=devi|
|00006390| 63 65 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |ce;....b|reak;...|
|000063a0| 7d 0d 09 7d 0d 09 72 65 | 74 75 72 6e 20 74 79 70 |}..}..re|turn typ|
|000063b0| 65 3b 0d 7d 0d 2f 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |e;.}./**|********|
|000063c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000063d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000063e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000063f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.